Click to See Complete Forum and Search --> : Setfocus to seperate form?
escudolm
Sep 27th, 2005, 03:15 PM
Alright, when I open up my form (frmmain), I have it so another form opens up in the background (frmlicense). How can I setfocus to the textbox (txtnum) in frmlicense? What I am trying to do is open up frmmain but have the setfocus on the textbox, txtnum, in frmlicense. I am just pulling information from a barcode scan and don't want the user to see the form in the background doing all the work. When it gets done getting the info, it puts it back into the frmmain form, for the user to see. I just need to figure out how to set the focus to that textbox. Thanks.
DKenny
Sep 27th, 2005, 03:17 PM
Have you considered putting a Hidden textbox on frmmain?
escudolm
Sep 27th, 2005, 03:23 PM
Haven't really thought about that. But, is there a way to setfocus to the textbox in the other form though? I will keep that in mind though.
DKenny
Sep 27th, 2005, 03:38 PM
This should set the focus for you.
frmlicense.txtnum.SetFocus
(But I still think you should use a hidden control on your main form)... ;)
escudolm
Sep 27th, 2005, 03:51 PM
Well, I can't do it like that because I am doing the VB in Access. But when I do this:
Forms!frmlicense!txtnum.SetFocus
I don't get any errors, but it doesn't setfocus to txtnum on frmlicense, like it should.
escudolm
Sep 29th, 2005, 08:05 AM
Anybody know how to do this?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.