Results 1 to 5 of 5
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    validation

    Hi




    I have a form which has two combo boxes and a search button.

    The search button creates two tempvars based on the selection in the combo boxews and then opens a form.

    If the user does not select an option from either combo box I want the macro to open a message box to say "Enter a church/Parish" or open a form.

    I created the macro and it does not work.

    I've attached a screen dump as I cant see a way to copy the macros code and post it.

    any help appreciated

    cheers

    Ian
    Attached Thumbnails Attached Thumbnails macros.jpg  

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    I don't use Macros but you could do this with code. Something like (untested "Air Code"):
    Code:
    If Nz(cboParish,0) =0 And Nz(cboChurch,0) = 0 Then
      Msgbox"Select a church or Parish"
    Else
      Docmd.OpenForm("frm_HomeFiltered")
    End If
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    many thanks,

    I only went to a macro because my VB knowledge is limited but I folow your logic so I'll give it a try

    cheers

    Ian

  4. #4
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    May thanks , that worked perfectly , my attempt failed because I didn't put in the 0,

    thanks again

    Ian

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Glad to be of help
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 2
    Last Post: 06-16-2015, 03:52 AM
  2. Validation
    By MTSPEER in forum Queries
    Replies: 11
    Last Post: 04-01-2015, 09:52 AM
  3. Validation
    By stefan200593 in forum Access
    Replies: 1
    Last Post: 03-25-2013, 02:32 PM
  4. Age validation
    By dolovenature in forum Programming
    Replies: 5
    Last Post: 09-01-2012, 09:21 AM
  5. validation
    By slimjen in forum Forms
    Replies: 6
    Last Post: 10-12-2011, 01:19 PM

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