Code Help

E

Erik

I could use some help with a coding question. What code
would be required to store [field1] from tbl1 to tbl2.
This example does not include the criteria because my
problem lies within-

tbl2.([field1])=me.([field1])

I am not sure that I am correctly using the me. / tbl2.
before the field name.

I hope this makes sense, if not, thanks for looking.
 
A

Arvin Meyer

Me. is a reference to the current form or report.

Me.txtMyControlName

replaces:

Forms!MyFormName!txtMyControlName

Does that help?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Erik said:
I could use some help with a coding question. What code
would be required to store [field1] from tbl1 to tbl2.
This example does not include the criteria because my
problem lies within-

tbl2.([field1])=me.([field1])

I am not sure that I am correctly using the me. / tbl2.
before the field name.

I hope this makes sense, if not, thanks for looking.
 
J

John Vinson

I could use some help with a coding question. What code
would be required to store [field1] from tbl1 to tbl2.
This example does not include the criteria because my
problem lies within-

tbl2.([field1])=me.([field1])

I am not sure that I am correctly using the me. / tbl2.
before the field name.

I hope this makes sense, if not, thanks for looking.

What's the context, Erik? You can't just refer to a Table object in
this way - you need to either have tbl2 included in the Query that's
being used as the Form's Recordsource, or open a Recordset. Also, the
syntax is usually

Me![Field1]

rather than Me.([field1]), which I've never seen and don't know if it
would work or not.

Step back a pace or two and describe what you're trying to accomplish.
I suspect there's a simpler way!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top