On Current Error 3075

lcook1974

Registered User.
Local time
Today, 18:28
Joined
Dec 21, 2007
Messages
330
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?


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
 
Okay, so I'm attaching a mock database for some help here.

if you click the Case review button you'll see the main form with a subform.

the subform has 3 combo boxes the last two are based on the first combo. They hold values in the table but don't show when going back and forth between records.

could someone help me out? I posted some code I tried in the first post.

I'm using Access 2003.

Larry
 

Attachments

Hey missinglinq,

I recieved and email notification that you commented on my "On Current Error 3075".

when I looked at the forum it isn't here.

Any who...I was using the Nz() function wrapped around the Dlookup(). My problem is that the combo boxes won't show the value when navigating back and forth from the records. I looked Cascading combo boxes and continuous forms and found "little" tricks about using text boxes to show the value of the fields. That's why there are unbound text boxes there. but when an Id for the combo box isnt there I get the message about missing value to be looked up.

I tried linking the values to the tables where the drop down values are looked and added a text field that way but on a new record my subform doens't show.

I think I have to re-design the table structure to get what I want.

Larry
 
Got it sorted out...had something to do with one of the table having "duplicated OK" when it shouldn't have.
 

Users who are viewing this thread

Back
Top Bottom