Results 1 to 8 of 8

Thread: After Update

  1. #1
    Join Date
    Nov 2005
    Posts
    49

    Unanswered: After Update

    When you click the next button, it brings up the next record within the database.

    I have it so that when you click the next button, MsgBox ID, which shows the ID.

    i.e. a MsgBox that says 10.

    Problem is, the MsgBox shows up BEFORE the information is updated, even though I have it at the end of the function.

    Any tips?

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    Try the on Current Event

    and
    if newrecord then
    Msgbox id
    End if
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Nov 2005
    Posts
    49
    Quote Originally Posted by myle
    if newrecord then
    Msgbox id
    End if

    Got any example of this for my txtid field?

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    Don't iunder stand question

    copy from the help
    You can use the NewRecord property to determine whether the current record is a new record. Read-only Integer.

    expression.NewRecord
    expression Required. An expression that returns one of the objects in the Applies To list.

    Remarks
    The NewRecord property uses the following settings.

    Setting Description
    True The current record is new.
    False The current record isn't new.
    So in the CurrentEvent of the form

    Private Sub Form_Current()
    If NewRecord Then
    MsgBox textid
    End If
    End Sub
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #5
    Join Date
    Nov 2005
    Posts
    49
    Great! That works.


    Now the only problem is the downloading of the image. It is so slow.

    Is there anyway I can hide the download image box or have it run in the background?

  6. #6
    Join Date
    Nov 2005
    Posts
    49
    Or run as the software is idleing for the next 2 records?


    It seems when ever I hit the next button twice (which means it needs to load 2 images), the system crashes.

  7. #7
    Join Date
    Nov 2005
    Posts
    49
    Thanks! It works!

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Images on a form can be extremely slow. I might recommend either having a separate popup form with just the image field or even just storing a link (i.e. the location/filename) of the image and have an "open image" button which opens the image using the stored filename via MSPaint or other program.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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