check out my new form and help me plz :)

hunterfan48

Registered User.
Local time
Yesterday, 16:13
Joined
Aug 17, 2008
Messages
436
I posted this new form...this is how I want it to look (ignore the horrible background colors for now lol) but I want to be able to put a search box in this form that would allow me to search that datasheet below on the page 1 tab.

That datasheet is based off a query called Cards in Stock.

So...

How do I put a search box in there that will match anything in that query and bring up only those related records? For example, if I type in Reggie Miller, it will only bring up those records that have Reggie Miller in it.

Or if I put the year in, 2008, it will only bring up those records that have 2008 in it?

Thanks in advance!
 
Have you had a look at the sample I posted here, it might do what you are looking for.
 
c'mon guys...isn't a forum here to help ppl? Just cause I looked at it and don't know how to do it doesn't mean I didn't try...why u holdin it against me I don't know how to do this. I came here for help...not to be insulted.
 
do u put the code in step 7 in a row below each field I want to search? I ran out of room if so...
 
Yes you need to put the Like "*" & [forms]![FRM_SearchMulti]![SrchText] & "*" criteria down one row, below each of the fields you wish to search, to create an OR argument.

I believe that there is a limit of nine OR arguments, so you may have to prioritise the fields you wish to search.
 
A quick tip; avoid using spaces and other special characters in your Object and field names, stick with alpha numerics and the underscore (_). Also consider implementing a naming protocol such as TBL_TableName, FRM_FormName, QRY_QueryName, RPT_ReportName etc.
 
yea I know but I'm worried it would mess everything up now w/ my relationships in stuff. is there a way to change those tables, queries, etc. n not mess up the whole database? I would definately do it if I knew it would keep everything the same...
 
First up Back up your DB, before you start fooling around changing names and trying to normalise it. Do all your tinkering and changing on a copy of the DB.

In the mean time I've done a rough (very) normalisation of your DB and implemented the Multi search.
 

Attachments

wow! sweet...thanks so much! Is there any way to use a subform instead of a list box to do this multi search? i really appreciate ur help tho...thank you so much.
 
hey John...I'm trying to use that code on my subform SearchCardsinStockForm but I keep getting tons of errors and having to manually go in and change it.

any suggestions?? if you don't mind, I'd appreciate it if you could apply code to search that subform. I'm trying, but like I said I keep getting errors.

Appreciate your help!
thanks,
brady
 
It should be a simple matter of populating your sub-form with the query that you are using to populate the list box. You will however need to change any reference (in the code) to the list box, to a reference to the Subform.

To be honest though I really can't see the benefits of a subform over a list box in this case.
 
well the reason I wanted to use a subform because I want to be able to checkmark the box for the field 'sold.' with a list box, it has a limit on the number of fields I can include right?

That would be the main reason why I'm wanting to use a subform.
 
'Set the focus on the first item in the list box
Me.SearchResults = Me.SearchResults.ItemData(1)
Me.SearchResults.SetFocus

it highlighted the itemdata and said it was wrong...what would I need to change it to to use my subform?
 
'Set the focus on the first item in the list box
Me.SearchResults = Me.SearchResults.ItemData(1)
Me.SearchResults.SetFocus

it highlighted the itemdata and said it was wrong...what would I need to change it to to use my subform?
3 months later:rolleyes:

Is this question related to your OP?
 

Users who are viewing this thread

Back
Top Bottom