AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Rob Henderson
Expertise
I can answer most MS Access design questions. I also welcome questions on database design and implementation and VBA programming questions. I also have expierence in application design for all the Office components (Excel, Outlook, etc).

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Change text box values as tab through datasheet.txt

Using MS Access - Change text box values as tab through datasheet.txt


Expert: Rob Henderson - 2/8/2005

Question
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

Answer
Hi

You could use the OnFocus or OnEnter events of the text boxes to grab your information.

If your data is on the form already setting a simple text box referal will work.

I.e.

Me.txtSynonyms.Value = Forms!NameofYourMainForm!NameofYourTextBox.Value

Does this help?

rob

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.