yes it opens the printer form (and please note that all the forms were designed with the wizard).
When i try to run this code (stDocName = " Computer" & Me!cboHardwareS election.Text
DoCmd.OpenForm stDocName) it gives an error (runtime error 2185 - u can't reference a property or method for a control unless the control has a focus).
And then when i use the same code with .Column(1) (which im not very...
User Profile
Collapse
-
I have 3 items in my slection list, which are (PC's, Printers, Laptops). This combo box is on a form called frmHardwareSele ction. The problem with this code is that it opens only one form (which is the printers form) regardless of the selection. The code links all the Items to a single form although i thot the Else Statement would take care of that.
Hope this will help and thanks 4ur support.Leave a comment:
-
i don't know if i was supposed to write any other thing besides what u gave me but i just copied and pasted as u've povided it and now im getting a run time error saying 'object required'.
and to answer some of your qstns, yes, im using a database and each value selected from the combo box should point directly to a separate form. So like u said, the value selected should then pull that specific form from the database.
...Leave a comment:
-
VBA Code for a Combo box selection
Hi everyone, I'm really new to vba programming and need help.
i have a combo box for hardware selection. in the list i have pc's, printers/scanners, laptops etc and I have also created and OK command button which when clicked after selecting hardware is supposed to return a form depending on the hardaware selected (each item in the list should be linked to a relevant form). And the RowSoureType is a "Value List".
...
No activity results to display
Show More
Leave a comment: