Results 1 to 3 of 3
  1. #1
    ellie is offline Novice
    Windows 98/ME Access 2007
    Join Date
    Aug 2009
    Posts
    2

    Question need to select value from maintable field

    Hello

    I have a table (MainTable) with the fields
    (PK)ID
    (cbo)from_dept
    document_date
    reference_number
    last_reference

    I have a query on the first 4 fields that is sorted to give the last reference_number for each from_dept This is the value I need to be automatically displayed in last_reference when the from_dept is selected from it's cbo The idea being that when I enter a new record I select from_dept and the last_reference for that from_dept pops up automatically and I add the next sequential value into reference_number
    ad nauseaum

    I have attached the file if someon can have a look and for me - I am now wondering after trying lookups, queries and failing to get codes written properly if I need another table into which the reference_number is entered rather than finding the data from the MainTable ???

    Does anyone have any ideas? If you look at query_reference the value I need to be seen in last_reference is LastOfreference_number.

    I just can't get this last bit sorted out.

  2. #2
    ellie is offline Novice
    Windows 98/ME Access 2007
    Join Date
    Aug 2009
    Posts
    2

    Thumbs up

    I figured this one out - I used a subform rather than AfterUpdate (this doesn't work on my computer for some reason)

    Thanks.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's great! Do you want to go ahead and use the Solved thread tool?

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

Similar Threads

  1. Select a certain field of a record based on ID
    By cesarone82 in forum Access
    Replies: 3
    Last Post: 06-06-2009, 01:16 PM
  2. VBA Script to run select query
    By pushpm in forum Programming
    Replies: 2
    Last Post: 05-06-2009, 08:36 AM
  3. Select query with two criteria
    By corni in forum Queries
    Replies: 1
    Last Post: 01-22-2009, 05:23 AM
  4. very difficult (for me!) SELECT query
    By igorbaldacci in forum Queries
    Replies: 1
    Last Post: 12-02-2008, 03:30 PM
  5. SELECT FUNCTION help please
    By scott munkirs in forum Queries
    Replies: 0
    Last Post: 10-17-2006, 07:44 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