Question on Unbound Forms with VB

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Hi everyone,

I have two unbound forms. One of them is call Computer and
the other is compuser. In the computer form I have a
textbox call compid. I created a command button call open.
When I click on open, this command button takes the value
in compid and open up the compuser form and placed the
value from the compid into one of the textbox in the
compuser form. Is this possible to be done?

Any help is appriciated.

Ben
 
Ben said:
I have two unbound forms. One of them is call Computer and
the other is compuser. In the computer form I have a
textbox call compid. I created a command button call open.
When I click on open, this command button takes the value
in compid and open up the compuser form and placed the
value from the compid into one of the textbox in the
compuser form. Is this possible to be done?


I prefer to use the OpenForm method's OpenArgs for this kind
of thing. In the Computer form's command button's Click
event, open the CompUser form like this:

DoCmd.OpenForm "CompUser", scNormal, _
OpenArgs:= CompID

Then in the CompUser form's Load event:

If Not IsNull(Me.OpenArgs) Then
Me.sometextbox = Me.OpenArgs
End If
 
Back
Top