Hello,
Before I ask my question, I want to say how good this forum is and how much help it has been to a complete novice.
At this moment in time I am having trouble creating VBA syntax (I think that is what it is called) that works to update one combo box (in subform) from another (in the main form). I have tried the same 'code' in the sample Northwind database and it works just fine. I have tried replacing '.' with '!' to no avail and have spent a long time reading other threads on the internet. Some of them are just beyond my understanding at the moment to be of any use.
My code for the After Update function in the first combo box is the following:
The error message 'Method or data member not found' comes up when I try to use the combo box and
is highlighted in blue. The first line is highlighted in yellow. The first line isn't highlighted when there is only the first part of the code being used (to connect this combo box to a box in main form).
I read that this bug often highlights a different part of the code to what is actually wrong, but even playing around with it I cannot get it to work, I just get different errors!
I don't understand why the first line would go from being fine then not even though it hasn't changed at all?
Any enlightenment would be much appreciated!
Lizy
Before I ask my question, I want to say how good this forum is and how much help it has been to a complete novice.
At this moment in time I am having trouble creating VBA syntax (I think that is what it is called) that works to update one combo box (in subform) from another (in the main form). I have tried the same 'code' in the sample Northwind database and it works just fine. I have tried replacing '.' with '!' to no avail and have spent a long time reading other threads on the internet. Some of them are just beyond my understanding at the moment to be of any use.
My code for the After Update function in the first combo box is the following:
Code:
Private Sub nestcombo_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[nest] = '" & Me![nestcombo] & "'" If Not rs.EOF Then Me.Bookmark = rs.Bookmark Me.bird_idcombo.RowSource = "SELECT bird_id FROM" & _ " bird_id WHERE nest = " & Me.nestcombo & _ " ORDER BY bird_id" Me.bird_idcombo = Me.bird_idcombo.ItemData(0)
Code:
Me.nestcombo
I read that this bug often highlights a different part of the code to what is actually wrong, but even playing around with it I cannot get it to work, I just get different errors!
I don't understand why the first line would go from being fine then not even though it hasn't changed at all?
Any enlightenment would be much appreciated!
Lizy
Comment