How can i do this?
What i've done is the following:
INSERT INTO P (Btsm, Bts, Data, Hora," & pa_Out & ") VALUES ('" & btsm &
"','" & bts & "','" & dia & "','" & hora & "','" & pa_Out_value & "');"
Pa_Out is the name of the field.
If the field you're inserting into is always the same then this should work;
the incoming data (pa_Out_value) would vary dynamically, but it would always
go into the pa_Out field:
"INSERT INTO P (Btsm, Bts, Data, Hora, pa_Out) VALUES ('" & btsm &
> "','" & bts & "','" & dia & "','" & hora & "','" & pa_Out_value & "');"
(assuming all your values are text; I see you have them all set off with
single quotes)
((((By the way, is the field really Data, since what you're trying to put
into it is dia? Maybe a typo there?))))
On the other hand, if you're trying to put the pa_out_Value bit of
information into a different field depending on ???whatever???, the
following would seem to be what you need. pa_Out would be the dynamic field
name you want to put pa_Out_value into; the incoming data would always be the
same, but the field it goes into would vary depending on pa_Out.
"INSERT INTO P (Btsm, Bts, Data, Hora," & pa_Out & ") VALUES ('" & btsm &
> "','" & bts & "','" & dia & "','" & hora & "','" & pa_Out_value & "');"
What happens when you try to run it? What should happen instead? How are you
running it?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Luis" <Lu...@discussions.microsoft.com> wrote in message
news:5C169854-A072-4C8C...@microsoft.com...
Thank you all.
Luis