table entry based on record

  • Thread starter Thread starter Joan
  • Start date Start date
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.
 
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
 
Back
Top