Results 1 to 9 of 9

Thread: Record Change

  1. #1
    Join Date
    Aug 2003
    Posts
    42

    Unanswered: Record Change

    I have a form with query as a record source. Currently the user has to move to the next record before the table will be updated with the values assigned by the the combo box selection. When the user chooses a selection from the combo box I want the record to update the table(combo box on change event?) without the user having to move to the next record(using the record navigation buttons). so basically if they are on the last record in that form the changes from the combo box will not get saved unless the table is updated by moving to the previous record where as I want the table updated once a selection is made from the combo box. Is this possible?

    Thanks in advance.

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    I thing that you can use the DoCmd.GoToRecord.....in the event afterupdate of the combo box to move to the next record in the form.
    Saludos
    Norberto

  3. #3
    Join Date
    Aug 2003
    Posts
    42
    that sounds like it'll work..ill try that when i get back to work

  4. #4
    Join Date
    Aug 2003
    Posts
    42
    that works but it doesnt. when you get to the last record it errors out and not to mention when the user chooses a item they can see the record unless they move back to the one they were just on b/c the event causes the record to change.

    any other thoughts?

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by waderw24
    that works but it doesnt. when you get to the last record it errors out and not to mention when the user chooses a item they can see the record unless they move back to the one they were just on b/c the event causes the record to change.

    any other thoughts?
    You can use the On Error sentence for when you are in the last record and go to the first record in that case.
    Use the code in the event exit of the combo box, then when the users press enter the forms go to the next record.
    Saludos
    Norberto

  6. #6
    Join Date
    Jul 2003
    Location
    Portugal
    Posts
    111
    On Error Resume Next

  7. #7
    Join Date
    Aug 2003
    Posts
    42
    Thing is I only want it to update the underlying table and not move to the next record until the user chooses to. There has to be a way to do this....any other ideas I can try?

  8. #8
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    If that is the case use code ( DAO ) in the event after update of the combo box for update in the table only that field.
    Saludos
    Norberto

  9. #9
    Join Date
    Aug 2003
    Posts
    42
    I figured it out. I ended up using:

    DoCmd.RunCommand acCmdSaveRecord ' Save record when changed

    in an "On Change" event for my combo box. Works for every condition, first, last record,etc.

    Thanks for your help!

    Cheers

Posting Permissions

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