Results 1 to 6 of 6

Thread: Setfocus to seperate form?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    73

    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.

  2. #2
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Setfocus to seperate form?

    Have you considered putting a Hidden textbox on frmmain?
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    73

    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.

  4. #4
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Setfocus to seperate form?

    This should set the focus for you.

    VB Code:
    1. frmlicense.txtnum.SetFocus


    (But I still think you should use a hidden control on your main form)...
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    73

    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:
    1. Forms!frmlicense!txtnum.SetFocus

    I don't get any errors, but it doesn't setfocus to txtnum on frmlicense, like it should.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    73

    Re: Setfocus to seperate form?

    Anybody know how to do this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width