473,808 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I make my form NOT tab to a new record

68 New Member
Hi!
I have a subform w/ an ID field that is linked the ID field in a parent form. In the tables for both, the ID field is a primary key. In the table that the main form reads from, the ID is an autonumber.

In my subform, I want the user to be able to tab thru the fields, but after the last field, the cursor should go back to the first field. What happens now, is if both are on ID = 24, when I keep tabbing, after the last field, my subform goes to a new record w/ ID = 0. It lets you enter new information, then says it can't save the record because it's a duplicate.

What am I missing?
Thanks!
Apr 24 '07 #1
6 5606
Lysander
344 Recognized Expert Contributor
Hi!
I have a subform w/ an ID field that is linked the ID field in a parent form. In the tables for both, the ID field is a primary key. In the table that the main form reads from, the ID is an autonumber.

In my subform, I want the user to be able to tab thru the fields, but after the last field, the cursor should go back to the first field. What happens now, is if both are on ID = 24, when I keep tabbing, after the last field, my subform goes to a new record w/ ID = 0. It lets you enter new information, then says it can't save the record because it's a duplicate.

What am I missing?
Thanks!
What I do is add an unbound text box to the sub form, making the colour the same as the background and no borders so that it can't be seen by the user. Make sure this box is the last one to be tabbed to, and then, in the on_enter event of this box, set focus to the first field in your form. That way, the user never completes the sub form, and the record does not get automatically saved.
Apr 24 '07 #2
ChrisWoodward77
1 New Member
What I do is add an unbound text box to the sub form, making the colour the same as the background and no borders so that it can't be seen by the user. Make sure this box is the last one to be tabbed to, and then, in the on_enter event of this box, set focus to the first field in your form. That way, the user never completes the sub form, and the record does not get automatically saved.
Hi,

Can you not set the form properties on the "other" tab to cycle current record only? Seems to work for me...

Chris
Apr 24 '07 #3
dk4300
68 New Member
Hi,

Can you not set the form properties on the "other" tab to cycle current record only? Seems to work for me...

Chris

I haven't used Access in a while and I had totally forgotten where to find that (or if it even existed). Thank you so much!!
Apr 24 '07 #4
sekon
1 New Member
Open the form in design and choose form properties.
On the Other tab is the cycle property. Set this to Current Record and your problem should be solved.
Apr 25 '07 #5
Lysander
344 Recognized Expert Contributor
Hi,

Can you not set the form properties on the "other" tab to cycle current record only? Seems to work for me...

Chris
Nice to learn something new. I did not know that option existed. (maybe it didn't in Access 2 and I never noticed the enhancement. Will save me messing around with tab boxes from now on, thanks)
Apr 26 '07 #6
NeoPa
32,579 Recognized Expert Moderator MVP
Hi,

Can you not set the form properties on the "other" tab to cycle current record only? Seems to work for me...

Chris
Nice work guys :)
Apr 26 '07 #7

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

Similar topics

3
3048
by: fred14214 | last post by:
Dear Group: I have built and customized a form using the wizard to put command buttons that will move to the NEXT record or PREVIOUS record. This works, but it needs some refinement. Presently, if I am on the first record and click the PREVIOUS record button, I get some built in, generic Access message. And, if I am on the last record from the table and I click the NEXT record button, I am advanced to the *new* record row in the table.
3
4580
by: Phil | last post by:
I am looking to set up a hyperlink control on a form to retrieve letters that correspond to a record on a form. That is, there may be 100 form records, and I would like each of those form records to have a hyperlink button or control on it. that when pushed, pulls up the unique Word document associated with that form record. In this example, there would 100 unique letters associated with 100 unique form records. I tried working with...
1
3569
by: Nothing | last post by:
Question: I have a form, open to a record, displaying some information. I have a button, on the form, that I want to click and have a print funtion on it. I want it to print the current record to a pre-defineed report, which is already built and has the same fields on it as the report, and then have the report close after printing and return to the form, which I dont want to close if I dont have to. Is there a way, easy or otherwise, to...
0
1255
by: mstanley71 | last post by:
Hi All, I have a problem, I'm using Access 2002 SP3. and am trying to use a button on each form to link back to a hyperlink on a table based on a combo box selection on the same form record..ie SELECT NNI_DRAWING FROM NNI1 WHERE NNI_CKT_ID=FORMS!PVC!NNI_USED;. I'm able to do this using a combo box to show the hyperlink (NNI_DRAWING). The problem is that this:
16
10124
by: usenet | last post by:
I want to be able to use the record numbers of a sub-form, are they available anyhow in VB (Access 2003)? I want to use the sub-form record number as *part* of the primary key for the table whose data is displayed on the sub-form. The other part of the primary key is the column used to join to the master table. E.g. I have TableA (the master table) with a primary key TableA.Column1. TableB which is shown in the sub-form has a primary...
4
1743
by: gary.cobden | last post by:
Hi I have a form/subform where a new record is created on the subform by a button click. After the new record is created, I then need to go directly and display the new record in the subform. My current code is:-
3
3933
by: ApexData | last post by:
I am using a continuous form for display purposes. Above this form, a single record is displayed so that when the user presses my NewButton they can enter a NewRecord which gets added to the continuous form that displays below. Under the NewButton I have these lines of code: Me.AllowAdditions = True DoCmd.GoToRecord , , acNewRec
1
4799
by: alex.gruenther | last post by:
I am new to Access and need help creating an edit record form. I've got a table called Player with attributes like name, address, phone, etc. I've created an edit player form with a combo box that gets populated with a list of all the players (run from a lookupplayer query). When I select a user it gives the unique player ID. Now my problem, how do I take the unique ID to select that player's record to edit? The bottom part of the...
5
1733
by: Marks | last post by:
Right I'm don't feel so nervous tackling VB as much now but basic stuff I'm great with so the next part of my script is: 1. Having a Front Menu. When you enter the number 1 in a textfield it selects formA, number 2 selects formB etc how would I do this? 2. E-mail Current Form Record. I found a similar thread to this but I used its code and it didn't work anyone got any ideas, I've managed to create one for Printing but not mailing any help...
1
1580
by: thread | last post by:
Hi i built a form that getting dynamic SQL string,the SQL string is placed in the record source when the form is opened. i notice when trying to reduce some proccess time from the form that it takes quite alot of time for the SQL string to be pass to the form record source i guess one of the reasons depend on the size of the data as well but is it posible to reduce the proccess time during this action?
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.