CODE
SELECT
tbl_Golf_Courses.Golf_Course_Index,
tbl_Golf_Courses.Golf_Club_Index,
tbl_Golf_Courses.Course_Name_And_Tee,
tbl_Golf_Courses.Name_And_Tee_Sort_Order
FROM tbl_Golf_Courses
WHERE
((tbl_Golf_Courses.Golf_Club_Index)=Forms!frmHoleEdit.cboSelectGolfClub);
tbl_Golf_Courses.Golf_Course_Index,
tbl_Golf_Courses.Golf_Club_Index,
tbl_Golf_Courses.Course_Name_And_Tee,
tbl_Golf_Courses.Name_And_Tee_Sort_Order
FROM tbl_Golf_Courses
WHERE
((tbl_Golf_Courses.Golf_Club_Index)=Forms!frmHoleEdit.cboSelectGolfClub);
But there WHERE statement seems to be ignored or is just wrong. In trying to figure this out I added a message box for the after update event as follows:
CODE
Private Sub cboSelectGolfCourse_AfterUpdate()
MsgBox ("Club = " & (tbl_Golf_Courses.Golf_Club_Index))
End Sub
MsgBox ("Club = " & (tbl_Golf_Courses.Golf_Club_Index))
End Sub
The purpose is to see the values that are used in my equals statement. But VBA does not like that statement complaining that it needs an object. Seems to me that:
CODE
tbl_Golf_Courses.Golf_Club_Index
is about as object as I can get. What do I have wrong here?
When I get that working, I will change the message box code to:
CODE
MsgBox ("Club = " & (tbl_Golf_Courses.Golf_Club_Index) &
“ Course = “ & Forms!frmHoleEdit.cboSelectGolfClub )
“ Course = “ & Forms!frmHoleEdit.cboSelectGolfClub )
So I can see why the equals statement in my WHERE phrase is failing.
What do I need to change to get an object in my message box code?
PS When I forget to click the box to get an email on reply, how can I enable that later. (I.e. Subscribe to this thread.)
Edited by: bkelly on Tue Sep 15 22:19:17 EDT 2009.