Consulting

Results 1 to 5 of 5

Thread: Pulling back Unique ID to excel

  1. #1

    Pulling back Unique ID to excel

    Hi,

    I have a userform (in excel) that sends all the data input into access.

    What Im wanting to know is if it is possible that when the user clicks "Add", I currently have a message box that confirms successfully added, Is it possible for that message box to include the Unique ID from Access in there?

    for example:
    "Entry number #1 - added"

    (ideally without another userform doing such a thing)

  2. #2
    Is it possible for that message box to include the Unique ID from Access in there?
    yes, of course it can be done, just query the table for the latest entry and return the id, to insert into msgbox

  3. #3
    Sorry to be awkward, how would this look? not a BIG access user just using it at the moment to store the data.

    "Select ID
    From Table"

    or something?
    not sure how I'd get last entry

  4. #4
    maybe try
    "select max(ID) from table"

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master xld's Avatar
    Joined
    Apr 2005
    Posts
    25,142
    Location
    How does it insert the data? If you are controlling that from Excel, firing an update query that supplies all of the data, then do you already know the ID. If the ID is an identity column, then you need to query the database for the max value, and hope someone else hasn't added one in the meantime (but if it were an identity column, why would you want to tell them the ID?).
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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