Re: Receive a 3134 error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"dst393 via AccessMonster.com" <u25458@uwe> wrote in message
news:651ab0fb033ed@uwe
Thanks for the reply, but I it might have something to do with my
table. In my table in one of the columns, there is a drop down menu.
In the the menu, the data is not the data that belongs in that
column. It looks likes the index number instead of the locations.
How do I delete filters from the table? I am still getting the
insert into error (error 3134).

You have a lookup field in your table, and that's definitely something
you have to deal with. However, I don't believe that is the source of
your 3134 error ("Syntax error in INSERT INTO statement"). Your lookup
field is likely to give you a type mismatch error when you execute the
INSERT, but you are not yet getting that far.

The code you posted will *definitely* give you the 3134 error, because
it results in a VALUES clause like this:

VALUES(123, , 'ABC', , #8/21/2006#)

The missing fields represented by consecutive commas are invalid syntax.
Instead, the clause must look like this:

VALUES(123, Null, 'ABC', Null, #8/21/2006#)

That's what the function I posted is designed to do: put the proper
delimiters around a value, and substitute the "Null" literal when there
is no value.

Dealing with the lookup fields is a separate issue. Most professional
developers don't like lookup fields, because of just this sort of
problem -- what is stored is not what is displayed. It has nothing to
do with filters, unless I'm completely misunderstanding what you've
posted. With lookup fields, you have to make sure that the value you
actually insert in the table is what the field is *storing*, not
necessarily what it is displaying. I don't know enough about your
database application to give you more explicit advice than that. Maybe
after you've got past the 3134 error, and start getting a type mismatch
error instead <g>, you can make a new post on the subject.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.



Relevant Pages

  • Re: Problem with Subform not displaying correct data
    ... your problem was that you were displaying the wrong column. ... > can do that with both List boxes and Combo boxes. ... Typically you bind the ... so i figured it had to be because of the Lookup fields in the tables. ...
    (microsoft.public.access.forms)
  • Re: List Box Displaying ID Numbers instead of text
    ... Sorry for snapping at you, but I can only go by what you post! ... working correctly but if you wouldnt mind one last question, i am displaying ... that information in text boxes at the point and since they are also drawing ... TURN OFF ALL YOUR LOOKUP FIELDS. ...
    (microsoft.public.access.forms)