Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making Form GoTo correct record

Status
Not open for further replies.

whoknows361

Technical User
Sep 22, 2005
228
0
0
US
Hello all.
I have really received from great advice (fneily, PVH) on my table and db structure.. and i have had some successes. But I am having trouble with my form "frm_OpenEpisode_submittd".

As you will see when u open the form it shows record 1 of 3. the First combo box "ClientName" is the main control..
I want it so that when you change Client Name to the correct name you want, it will go to that record.. However, currently, when you change the combobox it stays on record one and only updates record one.

I have looked online and have tried all the VB codes that others have supplied, but I always get an error.

Therefore, I have provided a link to my db in the hopes that someone will be able to help me out - as I am not sure as to where the error lies, I wanted to ensure that you all had all the data available to you.

Appreciate all your advice.

Jonathan
 
The problem is you're trying to use a bound combobox to retrieve a record, so when you make a selection from the ClientName cbo, it merely changes the name in the underlying field Client Name for that record, it doesn't move to the record associated with that name.

You need to delete your current ClientName combobox, and place a textbox on your form for displaying the ClientName field, then add an unbound combobox to retrieve records. This can be done thru the Combobox Wizard, without you having to write any code.

Add a combo box to your form. The Combobox Wizard will pop up

Select "Find a record based on the value I selected in my combobox."

From the table or query the form is based on, click on the field you're searching by (a field that is unique for each record, in this case [Client Name]) to move it to the right side.

Hit Next.

Size the column appropriately.

Hit Next.

Name the combobox.

Hit Finish.

Now you can drop the combobox down and scroll down to the item to search by, or you can start to enter the item, and the combobox will "autofill" as you type. Hit <Enter> and the record will be retrieved.

Welome to Bytes!

Linq ;0)>


The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
whoknows361,

Did you get your issue resolved?

--

"If to err is human, then I must be some kind of human!" -Me
 
sorry. yes thank you very much.. I appreciate everyone's help. I am getting a bit better at this thanks to all the support.

whoknows361
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top