Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MsgBox and with Table that tracks changes (2000)

    Hi,

    I have a subform based on a table called tblBoardInstructions which has the following entries: For Sale, SSTC, Under Offer, Collect Board. On the after update event of a combo box I publish the change in status for a particular property to the table which has the following code: -

    Dim lngPropID As Long, varnew, varold
    Dim rst As DAO.Recordset

    lngPropID = PROPERTYID
    varnew = BoardStatus
    varold = BoardStatus.OldValue

    Set rst = BoardTracker.Form.RecordsetClone

    rst.AddNew
    rst!StPropertyID = lngPropID
    rst!stdate = Date
    rst!stoldstatus = varold
    rst!stnewstatus = varnew
    rst.Update

    BoardTracker.Requery

    What I want to do is that if the user selects For Sale A message box appears asking them 'Are you sure you do not want a tag?' If answer is yes then resume the code, if no suspend until they enter characters into the field Boardtag.

    Any ideas?
    Best Regards,

    Luke

  2. #2
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MsgBox and with Table that tracks changes (2000)

    ~Still a beginner myself here.. but.....

    should be something like...

    Dim intNew as Integer

    If Yourcombo = "For Sale" then

    intNew = MsgBox("Are you sure you do not want a tag?", vbYesNo)
    if IntNew =vbYes then

    (do your code)

    Else

    ..
    End If

  3. #3
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MsgBox and with Table that tracks changes (2000)

    steve,

    Thanks for your help, much appreciated, newbie to Access and finding my feet still but getting there......slowly.
    Best Regards,

    Luke

Posting Permissions

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