Hello,
I am getting rather fusrtated - I have built a form including 2 comboboxes. the frist combobox uses an SQL query to select rowsource from my master table fine - however the second combobox recordset will vary depending what is entered in the first combobox. I have written a marco set in the 'on exit' event from the first combobox it goes like this;
the problem is - i keep getting an error using this - why would that be?
Any help would be greatly appreciated
Thanks
P
I am getting rather fusrtated - I have built a form including 2 comboboxes. the frist combobox uses an SQL query to select rowsource from my master table fine - however the second combobox recordset will vary depending what is entered in the first combobox. I have written a marco set in the 'on exit' event from the first combobox it goes like this;
Code:
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Dim mySql As String
mySql = "SELECT DISTINCT [Vessel In Date] FROM [Master Table - Packages] WHERE ([Master Table - Packages].[Vessel Name] =" & Me.Vessel_Name & ")"
Set rs = db.OpenRecordset(mySql)
Me.Vessel_In_Date.Recordset = rs
the problem is - i keep getting an error using this - why would that be?
Any help would be greatly appreciated
Thanks
P