I have a form based on a table that is opened this way...
DoCmd.OpenForm "frmAdminSetupI nfo", , , , A_EDIT
It was my intention that the form allow the user to edit table
data - not add records. The table contains a single record only.
I don't want more records be added to the table.
When frmAdminSetupIn fo opens, all one has to do to go to
a newrec (empty new record) is press PGDN or hold down
the TAB key until focus reaches last tabbable control then
TABs its way on to the newrec. How can I accomplish what
I'm seeking here? 5 1651
MLH wrote: I have a form based on a table that is opened this way...
DoCmd.OpenForm "frmAdminSetupI nfo", , , , A_EDIT
It was my intention that the form allow the user to edit table data - not add records. The table contains a single record only. I don't want more records be added to the table.
When frmAdminSetupIn fo opens, all one has to do to go to a newrec (empty new record) is press PGDN or hold down the TAB key until focus reaches last tabbable control then TABs its way on to the newrec. How can I accomplish what I'm seeking here?
Set the AllowAdditions property to No.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Some options:
1. Set the form's AllowAdditions property to No.
2. Cancel the form's BeforeInsert event.
3. Use a Number (not AutoNumber) field as the table's primary key. Set the
Default Value of this field to:
1
Don't expose this field in the form. After one record is added another
cannot be. If you want to go over the top, you could also set the Validation
rule on the field to:
=1
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"MLH" <CR**@NorthStat e.net> wrote in message
news:7l******** *************** *********@4ax.c om... I have a form based on a table that is opened this way...
DoCmd.OpenForm "frmAdminSetupI nfo", , , , A_EDIT
It was my intention that the form allow the user to edit table data - not add records. The table contains a single record only. I don't want more records be added to the table.
When frmAdminSetupIn fo opens, all one has to do to go to a newrec (empty new record) is press PGDN or hold down the TAB key until focus reaches last tabbable control then TABs its way on to the newrec. How can I accomplish what I'm seeking here?
MLH wrote: When frmAdminSetupIn fo opens, all one has to do to go to a newrec (empty new record) is press PGDN or hold down the TAB key until focus reaches last tabbable control then TABs its way on to the newrec. How can I accomplish what I'm seeking here?
In addition to what Rick and Allen mention, you can set the "cycle
records" form property (on the other tab) so that tabbing will only go
through the displayed record.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Thx, guys. All suggestions worked fine. I keep getting caught up
in old Access 2.0 thinking. 97 is a teeny bit different.
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxx In addition to what Rick and Allen mention, you can set the "cycle records" form property (on the other tab) so that tabbing will only go through the displayed record.
Allen Browne wrote: Some options:
1. Set the form's AllowAdditions property to No.
2. Cancel the form's BeforeInsert event.
3. Use a Number (not AutoNumber) field as the table's primary key. Set the Default Value of this field to: 1 Don't expose this field in the form. After one record is added another cannot be. If you want to go over the top, you could also set the Validation rule on the field to: =1
Myself, I'd do two out of the 3 and always No.3. It's all very well
preventing something on the form in a user freindly manner but if the
application will break with 2 records in that table then a table level
constraint is the way to go. This prevents a second record being added
by other means as well. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: volume |
last post by:
Restricting a windows textbox (edit item) to digits only.
Is there a windows option, using .NET C#, to only allow a user to enter
digits ONLY? If so, what is the flag or setting? If no, what is the best
method to manually and robustly do it?
I have a windows form with an editbox that I only want user's to enter
digits.
Thanks in advance.
|
by: compl |
last post by:
I have a database that I need to restrict the ability to edit one
field based on another. The two fields are DOS (date) and Amount
(currency). I only want the users to be able to edit the Amount field
if the DOS is =>now()-5. Does anyone have any suggestions? Thanks,
Lisa
|
by: sneddo |
last post by:
Ok I am trying to do the above, I have got a script that will restrict the length but it requires the user to enter the field and hit a key, before it will work.
This would normaly be find, but the title field gets its information from a previouse page so its value can easily be over 40 chars. (I can not restrict the length on the previouse page.)
The major dificulty is that there is no form on the aspx page, and I do not have access to...
|
by: GANA1234 |
last post by:
Hello all,
I have a form with which has buttons for adding and editing . I want to restrict the users from editing other users records but all the users can see everyone else records .
Also how to restrict the whole database from users and give access only to certain froms . Please guide me
Thanks
|
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,...
| |
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...
|
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,...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |