Hi,
K, I have this Database that I setup last year and I know it was working, but I just looked at it again yesterday to start working on it again and here is my issue....
Access 2007 now on windows 7 ( previously 2007 on XP)... just mentioning that because its the only thing that changed....
I have a main/subform, on the Main there is a control that I always want to have Focus as I use a barcode scanner to scan into the field, what ever is scanned is counted into the subform ( they are UPC's) so if same UPC is scanned it will increment the count , but after it does that the focus should return to the main form control... This definitely was working previously because I tested it to death.
So I have the setfocus in a few places...
AfterUpdate in the combo and the text box where scanning takes place ( Main form).
also at the end of my Subprocedure that updates the subform
but this is what confuses me, the lines below...
' this will clear the control, so why does the same syntax not move focus to the control ( in the next line)?
Me.txtUPC = ""
'I tried 2 variations...
'Me.txtUPC.SetFocus
Forms!frmRF!txtUPC.SetFocus
K, I have this Database that I setup last year and I know it was working, but I just looked at it again yesterday to start working on it again and here is my issue....
Access 2007 now on windows 7 ( previously 2007 on XP)... just mentioning that because its the only thing that changed....
I have a main/subform, on the Main there is a control that I always want to have Focus as I use a barcode scanner to scan into the field, what ever is scanned is counted into the subform ( they are UPC's) so if same UPC is scanned it will increment the count , but after it does that the focus should return to the main form control... This definitely was working previously because I tested it to death.
So I have the setfocus in a few places...
AfterUpdate in the combo and the text box where scanning takes place ( Main form).
also at the end of my Subprocedure that updates the subform
but this is what confuses me, the lines below...
' this will clear the control, so why does the same syntax not move focus to the control ( in the next line)?
Me.txtUPC = ""
'I tried 2 variations...
'Me.txtUPC.SetFocus
Forms!frmRF!txtUPC.SetFocus