I am trying to get data from fields in a form input by the user and then compare those field values to data already in the table. It involves checking the values of 3 fields together and I have written it as follows - obviously incorrect syntax:
strSQL = "SELECT ((t_main_venue_details.Venue_Name),(t_main_venue_details.proprietor_name),(t_main_venue_details.town)) FROM [t_Main_Venue_Details] WHERE ((t_Main_Venue_Details.venue_name = '" & Me.Venue_Name & "'" ) and (t_Main_Venue_Details.proprietor_Name = '" & me.proprietor_name & "'") and (t_Main_Venue_Details.town = ' " & me.town & "'" ))
It works with just one field from the recordset and then using where to the related field in the form, so the recordset bit is OK, I think.
Any advice appreciated. Thx
strSQL = "SELECT ((t_main_venue_details.Venue_Name),(t_main_venue_details.proprietor_name),(t_main_venue_details.town)) FROM [t_Main_Venue_Details] WHERE ((t_Main_Venue_Details.venue_name = '" & Me.Venue_Name & "'" ) and (t_Main_Venue_Details.proprietor_Name = '" & me.proprietor_name & "'") and (t_Main_Venue_Details.town = ' " & me.town & "'" ))
It works with just one field from the recordset and then using where to the related field in the form, so the recordset bit is OK, I think.
Any advice appreciated. Thx