Results 1 to 5 of 5
  1. #1
    Desverger is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    9

    Multiple tables with the same value

    What I have so far is 3 forms. One form has 2 buttons to open 2 other forms.



    Each form has a text box with this =[Forms]![Service Ticket Information]![Service Ticket No] To show what ticket the form is for.

    How can I have this value be saved in the tables in the 2 other forms?

    Do I need to add the field to the form? If so, how do I populate this field with the correct value?

    Thanks.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    well, first off there are no tables in the other 2 forms. the other 2 forms are merely displaying the data that is in a table. to change what the form displays, you have to INSERT INTO, UPDATE, or DELETE FROM the table(s) it is referencing.

    so, are you updating or creating a new record? I'm going to assume creating a new record. Run the following query

    INSERT INTO myTable (data1, data2, serviceTicketNo)
    VALUES (value1, value2, [Forms]![Service Ticket Information]![Service Ticket No])

    note the syntax (google "MS Access Insert Into" for more info). Now that you have entered the data into the table, your other 2 forms will be able to display it. Whether they do so depends on how the other 2 forms are set up.

  3. #3
    Desverger is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    9
    There are tables in the other 2 forms. I am not sure if that changes your answer or not.

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    the tables are not located in the form. you may be displaying the information from the tables in the forms, but i assure you, there are no tables stored within forms. The point I was getting at is that you do not have to change the forms in order to change the data being displayed. The query above will take whatever value is stored in that textbox, and insert it into the table of your choice. the form that is referencing the table will then display it.

  5. #5
    Desverger is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    9
    Ah, gothca. Sorry I think was having a senior moment on reading about the other 2 forms not having tables and yes the forms only display the values.

    I will give this a try and reply with either good news or bad.

    Thanks.

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

Similar Threads

  1. Updating Multiple Tables
    By gazzieh in forum Queries
    Replies: 0
    Last Post: 03-17-2010, 05:59 AM
  2. How can I search multiple tables?
    By botts121 in forum Access
    Replies: 4
    Last Post: 02-02-2010, 06:39 AM
  3. From with multiple tables
    By Darth_Katarn in forum Access
    Replies: 1
    Last Post: 09-23-2009, 08:17 AM
  4. using COUNT for multiple tables
    By kwalt in forum Programming
    Replies: 1
    Last Post: 02-17-2009, 04:05 PM
  5. using COUNT for multiple tables
    By kwalt in forum Queries
    Replies: 0
    Last Post: 02-17-2009, 03:06 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