Hello ,
I would like to create a search button that will take me to an existing form ID and also another button that will print preview the selected form .
Thanks for the help
G
Hello ,
I would like to create a search button that will take me to an existing form ID and also another button that will print preview the selected form .
Thanks for the help
G
Not really an answer but a hint.
You don't have answers to your questions (this one, and previous one as well) probably because nobody knows what you asking for (form ID? new record report?). Maybe try in plain English without trying to use Access jargon?
Fair enough
What I mean is when a new form is entered it will have a unique identifier like a reference (that is what I call form ID) . This reference will be added to the Table as a new record
For example : There are 5 forms
- 001
- 002
- 003
- 004
- 005
I would like to search for 003 with a search box . With other words would like to create a box that will pop up when a button is hit and will ask "Enter the form reference" -> 003 will be keyed in-> and 003 will open up
Hope this will explain![]()
G
Code:Private Sub YourButton_Click() DoCmd.OpenForm InputBox("Enter the form reference"), acNormal End Sub
But why entering it manually?
If you got all forms references in a table, make it a row source for combo box an select from there. Less prone to input mistakes.
Good idea
thank you for the help
Shouldn't use spaces in object names...... If you do use spaces, you MUST enclose the name with brackets: [Invoice no]
I never use "InputBox" to get input, but you might try:
Code:DoCmd.OpenForm "Order form", acNormal,, "[Invoice no] = " & InputBox("Enter invoice no")
This solved the issue
Thanks man![]()
Cheers