Changing of a Caption - part 2

G

Gary Dolliver

Next question, using below to get the captions to change, is there a way to
not have check boxes appear on form 2 if no caption value is passed across?

I have an if statement that passes the captions based on selections on
form1. for example, option 1 would have captions 1, 2, 3, and 4 appear on
form2, where option 2 would only have captions 1, 2, and 3. Is there a
command I could use so that caption 4 (and the check box associated with it)
will not appear as no caption is being passed across?

Thanks again!




Your 2nd form Load event will look something like:

Private Sub Form_Load()

Dim Args As Variant

If Not IsNull(Me.OpenArgs) Then
'-- Form is being opened from a form passing Label data
Args = Split(Me.OpenArgs, ";")
Me.Label1.Caption = Args(0)
End If

End Sub


Gary said:
Hello, sorry, I am not understanding... also, I think I need to give more
information. I am using 2 forms and 2 tables. Form1 is gathering
information that will determine what the captions are on form2. Table1 one
holds the information for form1 and is only linked to table2 via one field,
Order_ID. Table1 has fields of A, B, and C that depending on what values are
in these fields (1 through 5 in each), will determine what the captions are
for the text boxes form2.

Using the DoCmd.OpenForm, I tried putting in the arguments, however, how are
they referenced with the onLoad?

Thanks!
You can pass the field value in the OpenArgs argument of the OpenForm command
and then change your caption in the OnLoad event of the next form.
[quoted text clipped - 7 lines]
 

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