|
tech
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sorting based on selected value...Please help!I am trying to create a simple form where the users would enter (or select)
the VIN number and all of the repairs that match that VIN number (and ONLY that VIN number) will be displayed. I cannot save a filter for this because users will obviously want to search for many different VIN numbers. Am completely unfamiliar with coding, but there must be a simple way to do this without! Would appreciate any suggestions! Hi
I assume you have a field in the table called VIN Create a continous form based on the table. Call it Form1 Create a new form (Form2). Put a button (called ButtonName) on this and a text box (called Vin_Number_Input) Put this OnClick of the button Private Sub ButtonName_Click() DoCmd.OpenForm "Form1", acNormal, "", _ "[VIN]=[Forms]![Form2]![VIN_Number_Input]", , acNormal End Sub Type in a VIN number into the text box and click the button -- Show quoteHide quoteWayne Manchester, England. "MadCSS" wrote: > I am trying to create a simple form where the users would enter (or select) > the VIN number and all of the repairs that match that VIN number (and ONLY > that VIN number) will be displayed. I cannot save a filter for this because > users will obviously want to search for many different VIN numbers. Am > completely unfamiliar with coding, but there must be a simple way to do this > without! Would appreciate any suggestions! MadCSS wrote:
> I am trying to create a simple form where the users would enter (or select) Try a parameter query. Google has lots of video demos of this if you > the VIN number and all of the repairs that match that VIN number (and ONLY > that VIN number) will be displayed. I cannot save a filter for this because > users will obviously want to search for many different VIN numbers. Am > completely unfamiliar with coding, but there must be a simple way to do this > without! Would appreciate any suggestions! search for "access parameter queries". Essentially you put: =[VIN] ... in the criterion line of your query under the VIN field, and when the query is run, Access will pop up an invitation to enter the VIN you want. Base your form on that query (using a wizard) and you're just about done. Dead easy! HTH Phil Hi Phil
Not too sure about that - OK it will work but will mean it's a little difficult to use for other "stuff". If you're going down that road you may be better adding a Null criteria (or better a QBF) eg SELECT TableName.VIN FROM TableName WHERE (((TableName.VIN)=[Forms]![SomeFormName]![VIN])) OR ((([Forms]![SomeFormName]![VIN]) Is Null)); just a thought :-) -- Show quoteHide quoteWayne Manchester, England. "Philip Herlihy" wrote: > MadCSS wrote: > > I am trying to create a simple form where the users would enter (or select) > > the VIN number and all of the repairs that match that VIN number (and ONLY > > that VIN number) will be displayed. I cannot save a filter for this because > > users will obviously want to search for many different VIN numbers. Am > > completely unfamiliar with coding, but there must be a simple way to do this > > without! Would appreciate any suggestions! > > Try a parameter query. Google has lots of video demos of this if you > search for "access parameter queries". Essentially you put: > =[VIN] > ... in the criterion line of your query under the VIN field, and when the > query is run, Access will pop up an invitation to enter the VIN you > want. Base your form on that query (using a wizard) and you're just > about done. Dead easy! > > HTH > > Phil > Wayne-I-M wrote:
Show quoteHide quote > Hi Phil Yes, that's how I'd do it, but if you look at it from the OP's > > Not too sure about that - OK it will work but will mean it's a little > difficult to use for other "stuff". If you're going down that road you may > be better adding a Null criteria (or better a QBF) > > eg > > SELECT TableName.VIN > FROM TableName > WHERE (((TableName.VIN)=[Forms]![SomeFormName]![VIN])) OR > ((([Forms]![SomeFormName]![VIN]) Is Null)); > > > just a thought :-) > > perspective a PQ will get him working in seconds, but I think you'd have a bit of hand-holding to do if you were going to take him through the alternative! Phil
Need report to only select the "yes" based on month
Divide One Field into 3 parts Conditional formatting based on the Row Source in another control. repeat information in report (Access 2007) Report - how to print each page to new document. Remove Spaces Time Conversion relationships Auto populate month & year How do i dicount a field in access like cost? |
|||||||||||||||||||||||