Setfocus to seperate form?
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.
Re: Setfocus to seperate form?
Have you considered putting a Hidden textbox on frmmain?
Re: Setfocus to seperate form?
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.
Re: Setfocus to seperate form?
This should set the focus for you.
VB Code:
frmlicense.txtnum.SetFocus
(But I still think you should use a hidden control on your main form)... ;)
Re: Setfocus to seperate form?
Well, I can't do it like that because I am doing the VB in Access. But when I do this:
VB Code:
Forms!frmlicense!txtnum.SetFocus
I don't get any errors, but it doesn't setfocus to txtnum on frmlicense, like it should.
Re: Setfocus to seperate form?
Anybody know how to do this?