My Assistant
![]() ![]() |
|
|
Mar 27 2012, 09:46 PM
Post
#1
|
|
|
UtterAccess Veteran Posts: 394 From: Colorado |
Hi again, I thought I was done with the questions on this sub form I am working on. Never will I admit defet!, I will ask for help!
Here is the situation: I have a main form "NewTowTicket", with a button on the top of the form called Add Record. there is a sub form called "NewTicketSubQuery" in the NewTowTicket Form. The Property is set to Data Entry No, For the main form. this allows me to find existing records. The property is set to Data Entry Yes, for the sub form. This allows me to add records to the Main form record set. Problem: I open the form. and add a record to both the main form, (or just select an existing customer), and then type in the sub form, this creats the sub form record. Now I click the button "Add New Record" this gives me a fresh Main form, and clears all of the fields on the sub form. Problem:(except Calculated values and Tab Position.) The end user wants to tab to the beginnig of the Sub form for data entry, right now it goes to wherever she left off last in the sub form. I have tried refreshing, and requerying the form after the Add record button code is run, but It either errors or ignors the commands. what code should I use to clear the forms tab, and Memory of what the calculated text boxes were? Thanks David This post has been edited by Powelldog: Mar 27 2012, 09:48 PM |
|
|
|
Mar 27 2012, 11:03 PM
Post
#2
|
|
|
UtterAccess Veteran Posts: 391 |
Try the Recalculate Method of the subform then SetFocus on the first control in the tab list.
|
|
|
|
Mar 27 2012, 11:38 PM
Post
#3
|
|
|
UtterAccess Veteran Posts: 394 From: Colorado |
I think I got it. I changed the calculated field to just using a text box with the calculaton typed into it.
then used the following code to set the focus to the correct Text box. seems to work! CODE Private Sub Form_Current() Me.VYear.SetFocus End Sub Thank you for your help David |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 20th May 2013 - 08:34 PM |