Form Programming

B

Barbara

I would like to evaluate a entry on a form after it is
updated and based on what the entry is (could be 1 through
9) I would like to open other forms to input corrected
data. Can anyone help?

Thanks a bunch,
Barbara
 
D

Dirk Goldgar

Barbara said:
I would like to evaluate a entry on a form after it is
updated and based on what the entry is (could be 1 through
9) I would like to open other forms to input corrected
data. Can anyone help?

Thanks a bunch,
Barbara

It's not clear from your description whether you need to open these
other forms immediately after the control is updated, or whether you
have to wait until the current record is updated with the new value.
Assuming the former case, you might use an AfterUpdate event procedure
for the control in question. For example:

Private Sub txtMyTextbox_AfterUpdate()

Select Case Me.txtMyTextbox
Case 1 : DoCmd.OpenForm "FormA"
Case 2 : DoCmd.OpenForm "FormB"
Case 3 : DoCmd.OpenForm "FormC"
' ...
Case 9 : DoCmd.OpenForm "FormI"
End Select

End Sub
 

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