Mark Wood
asked on
Access 2010 Question
I have a form with 9 buttons on it. What i need to do is when you click on any of the buttons on form1 it will open form2 and only show the records based on that button.
if button1 on form1 is for experts then it will open form2 and only have the records for experts available.
if button2 on form1 is for novice then it will open form2 and only have the records for novices available.
and so on.
Is that possible and how do you do it?
if button1 on form1 is for experts then it will open form2 and only have the records for experts available.
if button2 on form1 is for novice then it will open form2 and only have the records for novices available.
and so on.
Is that possible and how do you do it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok i entered the code as follows:
DoCmd.OpenForm "IA Control Details", acNormal, "[IA Controls]![Control Level]='MAC 1 Classified'"
it returns all 1310 records instead of the 173 it should be. I have created queries that show me how many records there are for each level.
DoCmd.OpenForm "IA Control Details", acNormal, "[IA Controls]![Control Level]='MAC 1 Classified'"
it returns all 1310 records instead of the 173 it should be. I have created queries that show me how many records there are for each level.
ASKER
I got it working using the following
DoCmd.OpenForm "IA Control Details", , , "[Control Level]='MAC 1 Classified'"
DoCmd.OpenForm "IA Control Details", , , "[Control Level]='MAC 1 Classified'"
ASKER
Thanks
Thanks for the grade. Good luck with your project. -Jim
You would make a click event as stated above for each button, then set the dataset to the table accordingly
IE
Sub Button1click (...bla) handles button1.click
Form2.show()
Form2.grid.datasource = datasource1
end sub
Sub Button2click (...bla) handles button2.click
Form2.show()
Form2.grid.datasource = datasource2
end sub
..etc