syntax Error or Access Violation

G

Guest

I have a main form (Exhibitors) and subform (ExhibitorsBooths) when I add
a booth for an exhibitor that is going to the current show I get the
following error
"Syntax Error or Access Violation" The booth DOES get added and the column
with in the ExhibitorShowBooths table looks fine. There are basically 3
tables involved
Exhibitors, ExhibitorsShows and ExhibitorShowBooths. An Exhibitor can go to
more then one show and an Exhibitor can have more then one booth at a show.

I have the subform_booth link child fields and link master fields is set to
ExhibitorShowID

The main form RecordSource is set as follows:

strSQL = "SELECT E.ExhibitorID, E.ExhibitorShortName, E.ExhibitorName,
..Notes, " & _
"E.ProductDescription, E.DivisionID, E.ShowCategories ,
E.NewExhibitor, " & _
"ES.ExhibitorShowID " & _
"FROM Exhibitors E LEFT OUTER JOIN " & _
"ExhibitorsShows ES ON E.ExhibitorID = ES.ExhibitorID " & _
"WHERE (E.showCategories = " & "'" & pubShowCategory & "' " & _
"OR E.ShowCategories = 3) " & _
"ORDER BY ExhibitorShortName "

Form_Frm_Exhibitor.RecordSource = strSQL

The subForm RecordSource is set as follows:

strSQL = "SELECT ES.ShowId, ES.ExhibitorID, ESB.ExhibitorShowID,
ESB.BoothName " & _
"FROM ExhibitorsShows ES " & _
"INNER JOIN ExhibitorShowBooths ESB ON ES.ExhibitorShowID =
ESB.ExhibitorShowID " & _
"ORDER BY BoothName"

Form_subfrm_ExhibitorBooths.RecordSource = strSQL

Any ideas on why the error message appears, even though the data looks fine?
Is
there a way to prevent the message from appearing? I did try
DoCmd.SetWarnings False
Or maybe I need to add/change something to make access happy :)

Any help would be greatly appreciated
ToniS
 
B

Brendan Reynolds

ToniS said:
I have a main form (Exhibitors) and subform (ExhibitorsBooths) when I add
a booth for an exhibitor that is going to the current show I get the
following error
"Syntax Error or Access Violation" The booth DOES get added and the
column
with in the ExhibitorShowBooths table looks fine. There are basically 3
tables involved
Exhibitors, ExhibitorsShows and ExhibitorShowBooths. An Exhibitor can go
to
more then one show and an Exhibitor can have more then one booth at a
show.

I have the subform_booth link child fields and link master fields is set
to
ExhibitorShowID

The main form RecordSource is set as follows:

strSQL = "SELECT E.ExhibitorID, E.ExhibitorShortName, E.ExhibitorName,
.Notes, " & _


..Notes is an invalid field name. Field names can't contain a period/full
stop.
 
G

Guest

Thanks for responding... I apoligize for that.. when I posted the question (I
typed my question w/i word and copy and paste, I then tried to clean it up
some to make it easier to read) I must of accidently deleted the E. for
Notes. I did check my source code and it was there correctly E.Notes

I am having the same problem... message comes up when I add a new booth
number (text box control) no source code associated w/ the textbox.

ToniS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Select Left Outter Join 2

Top