I wasn't entirely sure where to put this post, but here goes anyway. I have 2 text boxes on this form, on top of each other. What I am doing, is displaying one text box which has a time in it, but when it gets focus, it moves the focus to the other box which has the time in seconds. The time in seconds is what the user is to be updating. Then when the textbox loses focus it should switch back to the the time box, which gives an easier to view display of the data.
Any ideas on how to get this to work would be great.
As it sits right now, it works, but you have to save the form after a change, then click on and off of the textboxes again.
Dan
Any ideas on how to get this to work would be great.
As it sits right now, it works, but you have to save the form after a change, then click on and off of the textboxes again.
Code:
Private Sub dForecastAHTT1_Exit(Cancel As Integer)
Dim AHT As Single
AHT = dForecastAHTT1
AHT = AHT / 24 / 60
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tData SET dForecastAHTT1Time =" & AHT
DoCmd.Requery "dForecastAHTT1Time"
DoCmd.SetWarnings True
dForecastAHTT1Time.Visible = True
End Sub
Code:
Private Sub dForecastAHTT1Time_GotFocus()
dForecastAHTT1.SetFocus
dForecastAHTT1Time.Visible = False
End Sub
Dan