Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    ryan1313 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    20
    What i meant was, make sure that all of the controls on the form 2 have control sources that are in the table that you are pulling out of your select statement.



    SELECT LeveeInfo.SegmentName FROM LeveeInfo ORDER BY LeveeInfo.SegmentName;
    This statement is setting the forms record source to only pull the SegmentName and no other information from the table, so the only control that will show up with data on the form is the control with its control source set to SegmentName. If you have any other controls with control sources bound back to the table, they will display #Name.

  2. #17
    sergio is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    9
    Quote Originally Posted by ryan1313 View Post
    What i meant was, make sure that all of the controls on the form 2 have control sources that are in the table that you are pulling out of your select statement.



    This statement is setting the forms record source to only pull the SegmentName and no other information from the table, so the only control that will show up with data on the form is the control with its control source set to SegmentName. If you have any other controls with control sources bound back to the table, they will display #Name.
    I'm probably wrong, but it sounds like you're saying that I should have column headings with the same names across all tables that will be using that SQL statement. Since SegmentName is repeated across the 4 tables (but it soon won't be once I optimize the database), the segment name is the only data being pulled from another table (even though it's using row source to display that from the 1st table). However, the criteria that is already on the secondary tables gets #Name in the textboxes because their labels do not match the ones in the 1st table. I'm sorry, but I'm a novice with Access (haven't used it in 8 years prior to this). I can understand some coding to a degree and interpret what are the variables within the code, but this is a lot for me to wrap my head around.

    I thought it would be easy to have the SegmentNames as some sort of primary key, even though they're not sorted alphabetically, just assigned an autonumber. Then from there Tables 2, 3, and 4 will refer to LeveeInfo for the list of locations and then look within their own tables and match the autonumber.

    So Table 2 has a combobox, the user chooses Elizabeth, NJ and table 1 "tells" table 2 that Elizabeth has an autonumber of 1, so Table 2 looks at row 1 and then displays all the data listed in the first row (names of people involved, dates, etc.) in the appropriate textboxes.

    That is, ultimately, what I want to achieve with this database, and it really isn't complicated, but translating that into code is where my problem lies.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-20-2010, 06:54 PM
  2. Writing data from textbox to table
    By mll in forum Forms
    Replies: 4
    Last Post: 03-10-2010, 05:10 PM
  3. Writing Access functions
    By new2access123 in forum Programming
    Replies: 5
    Last Post: 02-06-2010, 10:47 PM
  4. Automatically Writing SQL From A Table
    By smitstev in forum Programming
    Replies: 1
    Last Post: 06-05-2009, 09:38 AM
  5. I need help writing a query statement
    By dking in forum Queries
    Replies: 1
    Last Post: 02-25-2009, 09:43 AM

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