My Assistant
|
|
Apr 3 2012, 07:27 PM
Post
#1
|
|
|
New Member Posts: 3 |
Here is what I would like to do. I have a "client center" where you bring up the demo data on a client. On frm_cli_center, I have buttons to open 4 different forms. When a button is clicked, I would like it to open the form, carrying forward the empl_id of the current record on the client center. If that empl_id already exists, I want it to open with the data that was already entered. Any help?
|
|
|
|
![]() |
Apr 3 2012, 07:38 PM
Post
#2
|
|
|
UtterAccess Veteran Posts: 400 |
You should be able to pass the value in using the Opening Arguments for the form.
When you open the form: CODE DoCmd.OpenForm "frm_cli_center", acNormal, , , , ,Me!empl_id And then on frm_cli_center Load event: CODE Private Sub Form_Load() If IsNull(Me.OpenArgs) = False Then Me.Filter = "empl_id = " & Me.OpenArgs Me.FilterOn = True End If End Sub Another more common way is to do this when you open the form: CODE DoCmd.OpenForm "frm_cli_center", acNormal, , ,"empl_id = " & Me!empl_id
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 20th May 2013 - 10:13 PM |