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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change text boxes values as tab through datasheet

Status
Not open for further replies.

etalent

Programmer
Jun 9, 2003
23
0
0
US
I've got a form with a subform and three text boxes on it.

The subform is a datasheet view of the query that is the form and the subform's record source. This subform works perfectly. My problem is with the three text boxes.

What I want to happen is this: as I tab forward and backward through the cells of the datasheet, I want the values of the text boxes to change according to which cell I'm in.

How?

The fields of the datasheet view are as follows:
Category
English
Spanish
Portuguese
Kreyol
French

It's simply a five language dictionary. The category field is for stuff like parts of speech, months, etc.

The three text boxes are as follows:
Synomyms
Antonyms
Example

Here's the idea again. As I tab through the dictionary, I want the values of the text boxes to change according to the word (cell) that has focus, that is, I want the "Synonyms" text box to display synonyms of the word I select in the dictionary. Ditto for the "Antonyms" text box and also for the "Example" text box.

I've got the little database zipped up and ready to send. It has only two records in it so far.

Thanks!
-Dave
 
You have to have an unbound text box on the mainform and pass the values of the cells to that textbox as the curser moves. Then reset(refresh) the subform as per the value of the textbox. This is the only idea comes in my mind.

Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
Well first, you may have more luck with using a subform instead of a datasheet. You can make better use with event procedures with a subform.

I would then look at the use of the OnCurrent event procedure.

As far as coding, I am not quite sure of your design which really helps for coding. You have provided info on control fields on the form, but I am not sure if these are one, two or more tables.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top