Results 1 to 2 of 2
  1. #1
    graviz is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    48

    If statement Issue????

    I have two combo boxes and I'm trying to do some checking if the end user selects a value and if not display a message. I'm getting an "invalid qualifier" error. Here is my code:

    Dim stdate As String
    Dim endate As String
    stdate = cbostartdate.Value
    endate = cboenddate.Value
    If IsNull(stdate.Value) Then


    MsgBox ("Please select a start date")
    ElseIf IsNull(endate.Value) Then
    MsgBox ("Please select an end date")
    End If

    Any ideas?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Where do you have this code? The best event to validate the entry in a control is the BeforeUpdate event of the control.

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

Similar Threads

  1. small if statement help please
    By taylorosso in forum Programming
    Replies: 16
    Last Post: 09-23-2009, 11:23 AM
  2. IIF statement
    By james1982 in forum Access
    Replies: 1
    Last Post: 07-20-2009, 09:38 AM
  3. how to use IF then statement
    By ronnie4 in forum Access
    Replies: 1
    Last Post: 03-17-2009, 11:32 PM
  4. If then statement in query
    By ronnie4 in forum Queries
    Replies: 1
    Last Post: 01-20-2009, 10:49 AM
  5. multiple iif statement NEED HELP PLZ
    By scott munkirs in forum Reports
    Replies: 1
    Last Post: 09-27-2006, 05:21 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