Hey,
So I have a continuous subform that has 3 combobox fields in it.
When those fields have a value the .column(1) is entered in an unbound text box.
When navigating to a new record I'm getting the error 3075 missing cmb.locationId.
What kind of logic do I need for it look at a new record and skip that particular part of the code?
I tried
Larry
So I have a continuous subform that has 3 combobox fields in it.
When those fields have a value the .column(1) is entered in an unbound text box.
When navigating to a new record I'm getting the error 3075 missing cmb.locationId.
What kind of logic do I need for it look at a new record and skip that particular part of the code?
Code:
Private Sub Form_Current()
If Me.NewRecord Then
Me.txtRecordCount = "New Record of " & Me.RecordsetClone.RecordCount
Exit Sub
Else
Me.txtRecordCount = "Record # " & Me.CurrentRecord & " of " & Me.RecordsetClone.RecordCount
End If
Me.txtLocation = Nz(DLookup("OrgName", "tblOrganization", "[OrgId] = " & Me.cmbLocation), "")
Me.txtPersonnel = Nz(DLookup("LName", "Personnel", "[PersonellId] = " & Me.cmbPersonell), "")
Me.txtIssueType = Nz(DLookup("Description", "tblDropDownValue", "[DropDownId] = " & Me.cmbIssueType), "")
End Sub
I tried
Code:
If me.newrecord then
exit sub
Else
Me.txtLocation = Nz(DLookup("OrgName", "tblOrganization", "[OrgId] = " & Me.cmbLocation), "")
Me.txtPersonnel = Nz(DLookup("LName", "Personnel", "[PersonellId] = " & Me.cmbPersonell), "")
Me.txtIssueType = Nz(DLookup("Description", "tblDropDownValue", "[DropDownId] = " & Me.cmbIssueType), "")
End if
Larry