Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Datasheet with filter

Status
Not open for further replies.

Lightlancer

Programmer
Jul 18, 2008
88
NL
Hi all,

When i open a form it has a field named: Productname
when this is filled in and the user presses Click
de form closes and opens another form in Datasheet.
the filter must be something like Productname = Productname so in the datasheet all records with the same Productname will be shown. After that is done, the user will click on: In storage and then all checkboxes in this query must be checked (the Datasheet is in a subform and the button: In Storage is on the mainform)

Ive read Superguppie's Thread, but couldnt get much info from it.....

Can someone please shoot me to the right direction?

Great, Thanks

Lightlancer
 
How are ya Lightlancer . . .

Try this:
Code:
[blue]   Dim Cri As String
   
   Cri = "[ProductName] = '" & Me!ProductName & "'"
   DoCmd.OpenForm "FormName", , , Cri[/blue]
Empower yourself and have a look at the [blue]DoCmd.OpenForm[/blue] method in VBA help.

[blue]Your Thoughts? . . .[/blue]

BTW: Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2] . . . Its worth reading!

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top