table entry based on record

J

Joan

I have a cmd button on a form that updates two separate
tables via SQL code. When the user is on this form, I
would like them to be able to press the cmd button and
update the tables with only information based on the
record they are currently on. Right now the button works
but it sends all record info not just the current
record. Any suggestion how to set up my Where clause or
something to handle this is appreciated.
 
A

Arvin Meyer

Where ID = & Me.txtID

Depending upon where you are using this, it may require quotes:

"Where ID =" & Me.txtID

amd if ID is text, it would be:

"Where ID ='" & Me.txtID &"'"

ID is the name of the field in the table, and txtID is the name of the ID
control on the form.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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