Anyone any ideas?
Thanks in advance.
Rich.![]()
Anyone any ideas?
Thanks in advance.
Rich.![]()
I have this bit of code - not working though!!row in the brackets is a field in "qry_select_boxes", "su_box_location" is a table, box_ID is a field in that table and cboBox is the combo I'm trying to use as the id. The code does nothing though.
Private Sub cboBox_Change()
Dim row As String
Me.cboBox.SetFocus
row = DLookup("[row]", "qry_select_boxes", "su_box_location.box_ID=Me.cboBox")
Me.txt_row.SetFocus
Me.txt_row.Text = row
End Sub
Try:
Private Sub cboBox_Change()
Dim row As String
Me.cboBox.SetFocus
row = DLookup("[row]", "qry_select_boxes", "su_box_location.box_ID="&Me.cboBox)
Me.txt_row.SetFocus
Me.txt_row.Text = row
End Sub
A bleeding ampersand!! I just don't believe it!! All morning gone because of a bleeding ampersand!!!
Thanks a million!
You are a life saver!
I now have a similar problem to the first one you resolved for me regarding the subCmbo/mainCmbo thing.
The thing is now though that I need the text box populated using the code above to change when the combo on the main form has been changed, rather than just when the subform combo is changed. Does that make sense? Is there some kind of Requery thing I can use?
thank s a million for the help you've given already!! Really appreciate it!