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).
Using MS Access - Change text box values as tab through datasheet.txt
Expert: Rob Henderson - 2/9/2005
Question Neither putting "DoCmd.RunCommand acCmdSaveRecord" after the code for the data sheet text boxes on the subform, "txtSpa", or for the text boxes on the main form, "txtSyn" saves what I enter into the text boxes on the main form "txtSyn", "txtAnt", and "txtEx".
Do I dimension a recordset perhaps?
Still, I just need the use the presently unbound text boxes on the main form "txtSyn", "txtAnt", and "txtEx" for entering records, not just viewing.
Private Sub txtSyn_LostFocus()
DoCmd.RunCommand acCmdSaveRecord
End Sub
Answer You must put this code in BEFORE you attempt to get the other data. Otherwise, the record is not saved and cannot bring your data back (because until it's saved - it doesn't exist).
You obviously need to complete some initial data for your record - then save it - then attempt your data retrieval.