Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    1

    Variables in Forms

    Ok say i have a form pulling from a table(call is table A)
    and the first combo box hold an integer that is a auto number starting at 1 (which in this case is the same number as the current record I'm in)
    what i would like to do is run a query in another combo box on the same form which would look something like

    Select ID
    From Table1, table 2
    Where Table1.ID = Table2.id

    My problem with this is it works for table 1 but the information never changes is there any way i can make a variable so my where clause would change when i changed records



    something like

    WHERE [CurrentRecord Number] = Table2.id

  2. #2
    is49460 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    40
    try to do the comparison by the primary key

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Shell with Batch Variables
    By robbyaube in forum Programming
    Replies: 2
    Last Post: 12-19-2019, 11:06 AM
  2. Using Public variables between forms/queries/reports
    By dcrake in forum Sample Databases
    Replies: 2
    Last Post: 12-25-2015, 05:44 PM
  3. Append Query using variables
    By hawg1 in forum Queries
    Replies: 2
    Last Post: 06-09-2010, 08:59 AM
  4. Eval function with variables
    By tuna in forum Programming
    Replies: 3
    Last Post: 05-14-2010, 06:02 PM
  5. sql in vb variables
    By emilylu3 in forum Programming
    Replies: 3
    Last Post: 03-04-2006, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums