T
ThriftyFinanceGirl
I need to check each record in a subform and create records if none exist.
Below is my code with comments where I know I need to create the Loop but I'm
not really sure how. I just haven't ever had to create records en masse' so
I've just never learned how! Guess it's time!
=====================================
'Now check each record to see if the LocationObjects exist
MsgBox "Checking for LocationObjects"
Application.Echo False
Me.qryWorkWithTax_subform.Form!TaxPercentage.SetFocus
If DCount("Taxable", "qryCheckLocObj") < 1 Then
'there are no LocationObjects for this tax
'create them
MsgBox "there are no LocationObjects for Tax " &
Me.qryWorkWithTax_subform.Form!TaxID
DoCmd.OpenQuery "qryAddNewLocationObjects"
'check the next record
Else
'there are already LocationObjects for this tax Move Next and
'check the next record
End If
'Application.Echo True
Below is my code with comments where I know I need to create the Loop but I'm
not really sure how. I just haven't ever had to create records en masse' so
I've just never learned how! Guess it's time!
=====================================
'Now check each record to see if the LocationObjects exist
MsgBox "Checking for LocationObjects"
Application.Echo False
Me.qryWorkWithTax_subform.Form!TaxPercentage.SetFocus
If DCount("Taxable", "qryCheckLocObj") < 1 Then
'there are no LocationObjects for this tax
'create them
MsgBox "there are no LocationObjects for Tax " &
Me.qryWorkWithTax_subform.Form!TaxID
DoCmd.OpenQuery "qryAddNewLocationObjects"
'check the next record
Else
'there are already LocationObjects for this tax Move Next and
'check the next record
End If
'Application.Echo True