473,325 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Setting focus to single form portion of split form

122 100+
Hey all, another question about split forms in Access 2007. Hopefully this one is a quick one.

I have a bound spit form for data entry. The split form portion does not allow edits. I want it to be so that if the user clicks on the new record line of the split form (or arrows down to it, what have you) the focus moves automatically to the first data entry field (on the main form). What is happening though is that focus is moving to that field on the split form, which doesn't help since they can't type into it.

Here is the code that I have:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.   If Form.NewRecord Then
  3.     Forms![frmDataEntry].[txtItem].SetFocus
  4.   End If
  5. End Sub
Does anyone know how can I specify that I want the text control on the top (single form) part to have the focus?
Mar 10 '10 #1
1 4222
F6 will toggle the focus between the detail and datasheet section. I have been unable to find any syntax for moving the focus in VBA and resort instead to SendKeys "{F6}{F6}". You can determine whether the focus is in the datasheet by setting a Module Variable, it will not be available when the focus is in the datasheet.
Sep 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Nitin | last post by:
Hi I have created function to check date and time. at the time of execution, if date is left empty the function returns the error message but then the focus goes to next field. Next filed is for...
5
by: Tim Johnson | last post by:
Howdy: I'm just learning how to use focus() and select(). I have a very large form (360+ elements). Javascript validation is launched by the 'onclick' event handler in the "submit" button tag....
5
by: Melissa | last post by:
1. Is there a way to programatically remove the focus from the form; ie, so the focus is not on any control on the form? 2. Is there a way to programatically set the focus to the same place as...
2
by: Mystery Man | last post by:
We have an MDI application that is not setting always setting focus to the newly corrected MDI. It is creating the form and it is the topmost but it does not have focus. The code we are using to...
1
by: Jason | last post by:
I have created a c-sharp app that has keyup, keydown events tied to the form. The form also has some other controls, buttons, labels and 1 custom control that I made which inherits from user...
3
by: Steve Yerkes | last post by:
There seems to be way too much confusion over how to set focus on the a field using a field validator. I looked all over the web and found people trying to do this, but not getting anywhere. There...
5
by: Finn Stampe Mikkelsen | last post by:
Hi How can i set a focus to a textbox in my codebehind page?? I have this WebForm, that takes information from a user and 2 buttons on the form. One that takes action on the entered...
0
by: ARC | last post by:
Hello, I like the split forms in access 2007, because you can still do the header, and any tool buttons, yet have the datasheet look without the need for 2 forms (main form / subform). However,...
0
by: ARC | last post by:
I posted this before, but no response. Hopefully the MVP folks will know the answer. I'm not sure how other's are using the new split form, but what I like about it is I can design the header...
3
by: geosmy | last post by:
Hi everyone, Is it possible to highlight (a portion of the) text in a textbox without setting focus to it. What I'm interested is marking some portion of the text for reference while my cursor is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.