Caption Criteria

D

Don

Is it possible to set the caption property of a form based on criteria
selected from several other forms?
eg: from a Categories form, I click a cmd button to open a results form
displaying records for the chosen category and set the results form caption
to that category (this works ok for single caption criteria) as well as from
a payees form, open the same results form and set the caption to the selected
payee. In other words, set the caption to various other form criteria.

Thanks in advance.
 
A

Allen Browne

You can programatically set the form's caption to whatever you like, e.g.:
Forms("Form1").Caption = "Hello Don from Sydney"

Perhaps you could pass the desired caption in OpenArgs:
DoCmd.OpenForm "Form1", OpenArgs = "Hello world"
and then assign it in Form_Load:
If Me.OpenArgs <> vbNullString Then
Me.Caption = Me.OpenArgs
End If
 
D

Don

thanks for that Allen (I wondered who would reply at this hour then
remembered where you are!) will give it a go tomorrow night.
cheers.......
 

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