K
KarenB
I have code in my database that will populate text boxes after a selection is
made from a combo box. It's working great for combo boxes with text fields as
the source, but I can't figure out the correct syntax if the combo box
contains a number. Here is the code I'm currently using:
Private Sub cboRequestData_AfterUpdate()
Dim strNewRecord As String
strNewRecord = "SELECT * from ProjectRequestData_tbl " _
& " WHERE Request_Name = """ _
& Me!cboRequestData.Value & """"
Me.RecordSource = strNewRecord
what do I need to do to make this work? I need to match on an ID (number),
rather than a name on my new form.
Thanks
made from a combo box. It's working great for combo boxes with text fields as
the source, but I can't figure out the correct syntax if the combo box
contains a number. Here is the code I'm currently using:
Private Sub cboRequestData_AfterUpdate()
Dim strNewRecord As String
strNewRecord = "SELECT * from ProjectRequestData_tbl " _
& " WHERE Request_Name = """ _
& Me!cboRequestData.Value & """"
Me.RecordSource = strNewRecord
what do I need to do to make this work? I need to match on an ID (number),
rather than a name on my new form.
Thanks