Re: Receive a 3134 error
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 Aug 2006 11:42:27 -0400
"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)
.
- Follow-Ups:
- Re: Receive a 3134 error
- From: dst393 via AccessMonster.com
- Re: Receive a 3134 error
- References:
- Receive a 3134 error
- From: dst393
- Receive a 3134 error
- Prev by Date: Re: Link a master table to 16 tables, good or bad???
- Next by Date: Re: I get an Error when I type Me.ID="Code, Me" for VBA in Access.
- Previous by thread: Re: Receive a 3134 error
- Next by thread: Re: Receive a 3134 error
- Index(es):
Relevant Pages
|