display data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm sure this is a simple question but I cannot find the answer.

I enter a value in a text box then I click a command button to open a form.
When the form opens it needs to display the number I just entered in the
text box.

Do I add some kind of refresh to the on click???
 
You need some criteria in the On_Click event of your command button. It
should look something like the following (substitute your own form and
control names);

Dim strDocName As String
Dim strLinkCriteria As String

strDocName = "NameOfYourForm"
strLinkCriteria = "[SomeControlName] =" & Me![SomeOtherControlName]
(if the above referenced controls are text, then you'll need to add some
additional quotes like below)

strLinkCriteria = "[SomeControlName] = '" & Me![SomeOtherControlName] &
"'"


DoCmd.OpenForm strDocName, , , strLinkCriteria


HTH
 
Back
Top