text search box searchforrecord

michael61182

New Member
Joined
Apr 6, 2016
Messages
5
Hi,

Please someone help, I've been trying to complete this for 2 days now and cannot find the correct solution.
I am fairly new to Access but fairly knowledgeable as well; I have taken 24 hrs of Access training.

I have an employee form and would like to have 2 text boxes at the top of the form to search for SSN or Last name and navigate to that record, all within the same form. I'm sure this is possible and have seen this done a few times with a combobox, but I just want a text box. I'm able to create a button that will open a query for the same, but I dont want to open a query, I just need it to navigate to the actual record.

Can someone please help point me in the right direction?

Now just looking at the last name search, I have a text box -> txtqryLastName and a button cmdSearch. I know I can add code or a macro to the afterupdate filed of txtqryLastName so if thats an easier solution that is fine with me, I just need to finish this.

I've been able to get around with light VBA code and have tried multiple solutions but am just lost now. If someone can give me a macro that will work that is just fine with me too.

Now I have completely back tracked just trying to get something to work and have setup a button with ******* macro -> searchforrecord, Record - First, Where txtLastName = "Jon".
It seems this does find the record but instantly goes back the record I was already on. It happens so fast that I can barely see the screen flicker.

Please advise.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,214,832
Messages
6,121,854
Members
449,051
Latest member
excelquestion515

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