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/9/2005

Question
Forms!frmPentaling!txtSyn = DLookup("[fldSpaSyn]", "tblVoc", "[fldVocID] = " & Me!fldVocId)
   
----------------

This is the code that works perfectly as far as viewing, but I still need to be able to enter new records. This code doesn't give me that.

The text boxes on the main form, in this case "txtSyn", is unbound presently. They have no record source, so I suppose I have to give them a record souce, or would I dimension a record set?

Please tell me what to do with the "Antonym", "Synonym", and "Example" text boxes on the main form, so that I can use them to enter new records too, not just view existing records.

-Thanks

Answer
Hi

If this doesn't work for new records it must mean you do not have the data that this expression requires.

This is probably because you haven't saved the new record before attempting to rretieve the information.

Try running DoCmd.RunCommand acCmdSaveRecord before you attempt to retirieve the info.

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.