Results 1 to 2 of 2
  1. #1
    terry6582 is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Dec 2017
    Location
    TN
    Posts
    21

    Nees macro with if/then

    I need a macro that does the following: if [attendee.vendor]=-1 then open form [vendorpre-reg] else exit macro

    Thanks with any help. I am using access 2003. also have a computer with access 2010 if that will work better.

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Easier with VBA.

    Code:
    If Me.[attendee.vendor]=-1 Then
      DoCmd.OpenForm "[vendorpre-reg]"
    End If
    Is there really a period in your field name? I didn't think there could be, so perhaps that's table.field? Shouldn't need the table unless there are more than one in the form with the same field name. Symbols and spaces in your object names are not worth the bother in the long run.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-19-2017, 12:40 PM
  2. Replies: 7
    Last Post: 01-20-2017, 02:21 PM
  3. Replies: 1
    Last Post: 01-21-2015, 02:02 PM
  4. Replies: 1
    Last Post: 01-13-2015, 01:33 PM
  5. Replies: 2
    Last Post: 05-05-2012, 02:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums