Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Posts
    175

    Unanswered: Run Time Error 3075

    Hello. I'm receiving an error that I must debug. Here is the error.

    Run Time Error '3075' Syntax Error missing operator in query expression '[Individual ID]'=".

    Below is the code it's directing me to:


    Private Sub Participants_AfterUpdate()
    DoCmd.OpenForm "Main Form", acNormal, , "[Individual ID] = " & Me.Participants.Column(0)
    End Sub

    Any thoughts?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    If nothing is selected in the Listbox or Combobox [Participants], the expression Participants.Column(0) returns a null value. If you want to select the first row when nothing is selected, use:
    Code:
    Nz(Me.Participants.Value, Me.Participants.Column(0), Me.Participants.Column(0, 0))
    Also be sure that [Individual ID] is defined as numeric. Otherwise you must use:
    Code:
    "[Individual ID] = '" & Me.Participants.Column(0) & "'"
    Have a nice day!

  3. #3
    Join Date
    Oct 2010
    Posts
    175
    I'm afraid I'm lost. What do you mean by selecting the first row? The expression is supposed to open the main form to a blank form for which to enter a new participant. Thank you.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so you are tying ot open the form with a null value
    in which case just drop the
    Code:
    "[Individual ID] = " & Me.Participants.Column(0)
    and use
    Code:
    DoCmd.OpenForm "Main Form", acNormal
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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