Hi,
I'm using MS Access 2007.
I have a form, card_file, with an embedded subform, card_access_poi nt_file.
I would like to create a combobox on the main form to query the card_file on values in a field on the card_access_poi nt _file. Specifically, I would like the combobox to query the card_access_poi nt_file.accessp oint_entry field.
I have tried to do this as follows, where SAPE is the name of the cbo box, but I'm doing something--possibly many things--wrong.
Any help you can provide is greatly appreciated.
John
I'm using MS Access 2007.
I have a form, card_file, with an embedded subform, card_access_poi nt_file.
I would like to create a combobox on the main form to query the card_file on values in a field on the card_access_poi nt _file. Specifically, I would like the combobox to query the card_access_poi nt_file.accessp oint_entry field.
I have tried to do this as follows, where SAPE is the name of the cbo box, but I'm doing something--possibly many things--wrong.
Any help you can provide is greatly appreciated.
John
Code:
Private Sub SAPE_Button_Click() Dim stDocName As String Dim stLinkCriteria As String stDocName = "card_file" stLinkCriteria = "Forms!card_file!card_access_point_file.Form.acces spoint_entry LIKE" & "'*" & Forms!card_file!SAPE & "*'" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_SAPE_Button_Click: Exit Sub Err_SAPE_Button_Click: MsgBox Err.Description Resume Exit_SAPE_Button_Click End Sub
Comment