Thanks for the quick reply. When I place the combo box on the form, I only get two choices.
So here is what I was trying to do in code:
On the main menu, I have a combo box (cmbfindaircraft) that is populated with aircraft names from a query table. I am trying to open the "frmaircraftArrival Form" that displays data for that aircraft.
- Private Sub cmbfindaircraft_AfterUpdate()
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "frmaircraftArrivalForm"
-
stLinkCriteria = "[Aircraft Data Table Query]![Aircraft name]=[Forms]![frmMenu]![cmbfindaircraft]"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
cmbfindaircraft_AfterUpdate_Exit:
-
Exit Sub
-
-
cmbfindaircraft_AfterUpdate_Err:
-
MsgBox Error$
-
Resume cmbfindaircraft_AfterUpdate_Exit
-
End Sub
Unfortunately, this doesn't seem to work....
As a temp work around, I create a button that will pull a record based on the name in the combo box. It works but it would be nice to remove the extra key strokes from the process.
Thanks.