Command button

  • Thread starter Pass-the-reality
  • Start date
P

Pass-the-reality

On my switchboard I have a list box of all my active record ID numbers. If I
select record 5 from the list and hit the command button, record 5 opens up.
What code would I need to add to the command button that would allow me to
open record 5 for example (form name is frmMainForm) and also automatically
enter the word "CheckOut" in the CheckOut field on frmMainForm.
 
D

Dirk Goldgar

Pass-the-reality said:
On my switchboard I have a list box of all my active record ID numbers.
If I
select record 5 from the list and hit the command button, record 5 opens
up.
What code would I need to add to the command button that would allow me
to
open record 5 for example (form name is frmMainForm) and also
automatically
enter the word "CheckOut" in the CheckOut field on frmMainForm.


For example (your control and field names may be different):

DoCmd.OpenForm "frmMainForm", _
WhereCondition:="RecordID=" & Me!lstRecords

Forms!frmMainForm!CheckOut = "CheckOut"
 

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