Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2010
    Posts
    175

    Unanswered: Syntax Error Missing Operator in Query Expression

    Hello. I have a transaction table that I'm planning to use to link transactions between 2 different tables. Here is my SQL statement. I cannot figure out why I continue to get the following message: "Syntax Error Missing Operator in Query Expression".

    SELECT [Transaction_TBL].Transaction_ID, [Transaction_TBL].[Contact_ID], [Transaction_TBL].[Activity_ID], INNER JOIN [Transaction_TBL] ON [Activity].[Activity_ID] = [Transaction_TBL].[Activity_ID];

    My goal is to be able to have a space on my Contact form that pulls from my Contacts table and allows the user to choose several different Activities for that Contact.


    update: I was able to get the syntax error fixed. Now I need to figure out how to use my Transaction table on my form.
    Last edited by akanick; 03-30-15 at 12:08.

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    Use a subform on the main form, linked by CONTACT.ID
    On the form have TABS (or a combo). name each a catagory, like PHONES, HISTORY, CALLS, etc.
    then the user changes the tab (or combo item)
    the afterupdate will change the subform source query.

    Ex. cboCata = "Calls"
    me.subFrm!forms.recordsource = "qs" & cboCata

    (this reassigns the subform query to what gets picked, so you'd need queries for each option)
    qsCalls
    qsPhones
    qsHistory

  3. #3
    Join Date
    Oct 2010
    Posts
    175
    What I've done is created a Transaction Table that joins info from two tables. From this table, I created a subform that pulls all the same information from the transaction table. I used this table to create a query, which pulls the activity name from the transaction table, job category(title), first name and last name from the contacts table. And finally a report which shows all the information.

    My issue now is how to store the information. Or am I over-thinking this? Does the transaction table store the transactions?? I think it does.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Intersection table........
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Oct 2010
    Posts
    175
    healdem: does that mean that my assumption is correct, and that my "intersection table" stores the information?

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Have you followed the links referring to an intersection table?
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Oct 2010
    Posts
    175
    Yes. Was there something specific you were referring to?

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Im surprised that you keep referring to a 'transaction table'. bear in mind SQL databases are modelled on set theory. An intersection table describes where two (other) entities overlap, ans is a way of modelling a many to many relationship. The term teansaction table by itself has no intrinsic meaning, unless its used in the context of, say a stock control or bank account, where the transactiobs are indivdual rows recording movements of stock or cash. As a transaction they can have a positive or negative effect on the resultant balance.
    theres plenty of descriptions and examples of intersection tables out there. Seeking ibtersection tables will be far more rewarding than the term you are currently using
    I'd rather be riding on the Tiger 800 or the Norton

  9. #9
    Join Date
    Oct 2010
    Posts
    175
    Okay I haven't referred to it as a 'transaction table' since several posts back....I'm surprised you're still referring to that. In my mind, I think of it as a transaction table, because it marks transactions that happen between two tables....the exchange of information, if you will. I have read the articles you supplied me with. Surprisingly, I know quite a bit about stocks, bonds, and accounting...

    I have just one simple question, that maybe isn't even a question at this point. I may have answered my own...Does the 'intersection' table work to store the information that I enter into it?.....logically, I'm thinking that it does, because, like any other table, it has the ability to store the information. I just want to be sure that I can retrieve the information in the future, should I need to do so. I have created a query and report from the intersection table...so far so good. Thanks, Healdem.

    In connection to set theory, I also have a bit of training in the area of Discrete Mathematics as well. Sometimes I overthink things, however, and need a little guidance...thus the reasoning for this post/question.
    Last edited by akanick; 04-14-15 at 08:49.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •