Form functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that has 2 List Boxes (Project and Type). I would like to use
this form to open a second form. The second form has the same fields + some
additional data fields. I would like form 1 to open form 2, filtering the
data to match what is highlighted in the two list boxes on form 1. Is there
code or a function that will do this? I currently have a query written. The
query, however, prompts me to enter the info I want filtered. I would just
like to highlight the data in the two list boxes and push a button, or
something like that, to open the new form with filtered data.

Thank you
 
I have a form that has 2 List Boxes (Project and Type). I would like to use
this form to open a second form. The second form has the same fields + some
additional data fields. I would like form 1 to open form 2, filtering the
data to match what is highlighted in the two list boxes on form 1. Is there
code or a function that will do this? I currently have a query written. The
query, however, prompts me to enter the info I want filtered. I would just
like to highlight the data in the two list boxes and push a button, or
something like that, to open the new form with filtered data.

Thank you

Just use the WhereCondition argument of the OpenForm command.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Accessuser1308

On the Click event of a Command Button on Form1, code something like this...

DoCmd.OpenForm "Form 2", , , "Project='" & Me.Project & "' And Type='"
& Me.Type & "'"

(this example assumes that Project and Type are both Text data type fields)
 

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

Back
Top