Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Question Unanswered: Im using NotinList in combo box

    I got code to get me to my new form enter the data I need, then I get back to my original form but the information that I just put in the second form is not updated. How can I easily do this?

    Anyones help would be great!!!


    Surf
    Gotta to do some code

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    In the Lost Focus event of your second Form:

    DoCmd.RunCommand acCmdSaveRecord



  3. #3
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Run

    This will update the data in my new form????

    I gotta go try this!




    Surf
    Gotta to do some code

  4. #4
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Nope

    Nope! Did not work. I close my second form which brings me to my first form to the cell I entered new data. I goes through and ask the same MsgBox again. If I hit no in the message box it will enter the data though.

    Confused????
    Gotta to do some code

  5. #5
    Join Date
    Mar 2004
    Location
    St-Félicien, Québec
    Posts
    6

    Requery

    I had a similar problem. In my case the field to be updated was in a subform. My solution (simplified and without particular references):
    subForm_GotFocus()
    DoCmd.Requery "objectToBeUpdated"

    you should probably also be able to add this code directly to the GotFocus() for the text field

    Hope that does the trick

  6. #6
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Really

    I have got to try this right away!!

    I hope it works!!
    Gotta to do some code

  7. #7
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Unhappy Nope!

    It didn't work. Because if I put it under Got Focus, when I try to open my first form, It doesn't have any data yet so it gives me an error.

    Thanks though,
    Any other ideas out there???
    Gotta to do some code

  8. #8
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Didn't work?

    Nope!
    It didn't work. Because if I put it under Got Focus, when I try to open my first form, It doesn't have any data yet so it gives me an error.

    Thanks though,
    Any other ideas out there???
    Gotta to do some code

  9. #9
    Join Date
    Jul 2003
    Location
    Japan/California
    Posts
    68

    Post Requery like this

    im doing the same thing in my database. I requery like this and it works for me:

    Private Sub combo_Enter()
    Me.combo.Requery
    End Sub

    hth

Posting Permissions

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