Form population via button

DAyotte

Board Regular
Joined
Jun 23, 2011
Messages
84
Ok, I did a brief search through the forum (flame me if necessary), and although I did find something similar to what I'm looking for... it's not exactly what I need.

Using Access 07, I've put together a table of data with about... 7400 records - each one has a specific ID number.

I've then designed a form with all text boxes bound to the various columns of data. I want the user to be able to type in the ID they are requesting, hit the search button and BOOM, all the info is there. Everything I'm coming across is saying to use combo boxes, but with as many records as I have... that wouldn't be a viable option.

Please Assist.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Ahh, ok, I think there might be a little miscommunication.

There should be two different textboxes (in addition to the other controls) and a commandbutton. I was under the impression that the bound textbox with the store number was called Text_StoreNumber, but in that last post you said that the box we are pulling info from is Text_StoreNumber. What I mean by what we are pulling from is the second textbox that we are using as the search input box - where you would enter the store number. So, let me get a bit of info from you:
1. The code as it exists right now that you say is not pulling anything, but no errors.
2. The commandbutton code
3. The name of the search input textbox and it shouldn't be Text_StoreNumber and also the name of the command button.

Post that info, and it might help me see.
 
Upvote 0
ok... now I'm a bit confused, my apologies.

What code other than that of the command button are you looking for?
As for #3: I'll make another box and call it "Text_SrchBox".

Would it help if I sent you a screen shot? send me a PM with your email if you think that this will help.
 
Upvote 0
Lol, :oops:

Yeah, number 1 and 2 are the same. It's Friday, alright, give me a break! Lol!

I probably don't need a screen shot, because I think there was a bit of miscommunication earlier and I think that I know what the problem was. So try this:
Code:
Me.Filter = "Text_StoreNumber = " & Me.Text_SrchBox.Value
DoCmd.RunCommand acCmdApplyFilterSort

Essentially, I guess you were putting Text_StoreNumber where I put Text_SrchBox above, so what you were doing was trying to pull a value from the box that you were trying to filter by. The additional textbox called Text_SrchBox will be a place where the user can input the store number, and then the filter will run when the command button is clicked. Let me know if it works.
 
Upvote 0
Lol, :oops:

Yeah, number 1 and 2 are the same. It's Friday, alright, give me a break! Lol!

I'm not trying to give you a hard time, I'm just wanted to be sure. I'm new with this subject matter, and I'm doing my best to take it all in. :biggrin:

I'm going to give that a whirl right now.
 
Upvote 0
Can I ask why a combobox isn't an option?

There's nothing stopping a user typing something in one and then using whatever they typed for the search/filter.
 
Upvote 0
Can I ask why a combobox isn't an option?

There's nothing stopping a user typing something in one and then using whatever they typed for the search/filter.

It kept autopopulating incorrect info, and all the numbers in the combo box were out of numerical order, even when the table was sorted as such. Say I was going to search 326, it would throw in 3264. Also, I think it would be cleaner...
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,896
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top