Thanks Yummy - still only hides the label and doesn't show it when Zero value on subform
Private Sub Form_Current()
If IsNull(Forms!frmprojectstabbed!qrybomsubform.Form!Currcosttotal.Value) Then
Me.test.Visible = True
Else
Me.test.Visible = False
End If
Dave
I have a tab control form with a subform (qrybomsubform)
I wish to show a warning message on the main form if the field Currcosttotal on the subform = zero (not Null - zero)
I have the following - this hides the label but doesn't show it when I move to a record with a zero value.
Currcosttotal...
Thanks for your help guys - much appreciated.
I now have the code below - I keep getting a compile error - Do with out loop - can't seem to sort it out - Any further help would be very much welcome
Dave
Private Sub btnvalidate_Click()
On Error Resume Next
Dim rsTarget As DAO.Recordset...
I have a tempory table to which a list of part number are pasted from Excel.
I need to validate these numbers for being Known or New parts
I have the following code that finds "New" part numbers and inserts them in the "tblnewparts" table - this works fine.
I can't find a way of inserting the...
I have a problem with
Private Sub Field1_BeforeUpdate(Cancel As Integer)
If DCount("*", "tblnewparts", "partno = '" & partno & "'") = 0 Then ...........
When using part number that contain characters such as / and - eg 35006/H or 041-03729A the code recognises these as "new parts" while in...
Hi Remou,
I am using the before update event. I have tried If MsgBox("This is a New Part - Do You Wish To Add?", _
vbYesNo, "Project Costing Database") = vbNo Then cancel=True
Exit Sub
With no luck
Yes exactly, remove the typing once it has been added to the new parts table or if the new part is rejected.
I have tried If MsgBox("This is a New Part - Do You Wish To Add?", _
vbYesNo, "Project Costing Database") = vbNo Then Me.partno.Undo
Exit Sub
But this doesn't work...
Hi Remou,
Yes I suppose so - if a matching record for a part number is not found on the subform then the "new" part no is added to tblnewparts - I need to be able to remove the entry on the subform so that I don't get the "can't find matching record" error
Thanks Guys this Works fine - Cheers
DoCmd.RunSQL "INSERT INTO tblnewparts ( partno, xfile, issueno ) " _
& "Values ('" & partno & "', '" & Forms!frmprojectstabbed.Form!xfile & "', '" & Forms!frmprojectstabbed.Form!issueno & "')"
How do I remove the entry that has been added to...
I have a subform bound to the main form by two primary keys - Xfile and issueno.
I have a routine on a subform field that inserts a record in a table if no matching records found using
If DCount("*", "qrybom", "partno = '" & partno & "'") = 0 Then
If MsgBox("This is a New Part - Do You...
Hi PHV
Thanks again - I checked the "REAL" names - they are all correct now get Method Nz of Object_' Aplication error.
Think I'll give up now!!
Cheers
Dave
I have a label on a main form which I wish to display if a sub form field= zero
I am using this
Private Sub Form_Current()
If Forms!frmprojectstabbed![qrybomsubform].Form![Currcosttotal] = 0 Then
Me.warning.Visible = True
ElseIf Forms!frmprojectstabbed![qrybomsubform].Form![Currcosttotal] > 0...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.