473,383 Members | 1,978 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,383 software developers and data experts.

Limit number of entries for a record

We have a Healthy Life MS Access database where a person's number of blood pressure check ups are recorded and they are paid $2.50 for each checkup with a maximum of 2 entries (or $5.00 per year). How do I create a rule on the form so that the user is alerted when attempting to add a 3rd checkup, which exceeds the maximum.
Nov 8 '12 #1
1 1214
Rabbit
12,516 Expert Mod 8TB
Using an appropriate event, in your case, it sounds like you want to use the before insert event or before update event, use a DCount() to find out how many that person has. Then cancel the insert or update if they already have two.
Nov 8 '12 #2

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

Similar topics

29
by: Paul | last post by:
Hi, I'd like to limit the number of selections a user can make in a multiple select listbox. I have a note on the interface to say that only x no. of items should be selected and I check the...
2
by: Dalan | last post by:
I am finalizing an Access 97 db and need to decide was is the best method to limit the number of records one can enter in the demo version of same. The archives seem to be replete with many...
2
by: Dalan | last post by:
I have created a table and form for allowing the input of a unique customer number (not an ID autonumber number) which a customer would enter once after installing the database. I'm using DLookup...
2
by: Ian | last post by:
Using Access 97 I want to distribute my database over a LAN but limit the number of PC's that can use it at the same time. Perhaps limit it to 3 so when the 4th user tries to open it they cant...
2
by: Gianluca_Venezia | last post by:
Talking about high number of record seem ridiculus, if this number is about 88.000 but when I open a form, linked via ODBC to a MYSQL table, the open and the use of that form is slow, and very...
4
by: Melson | last post by:
Hi I've a problem. Can anyone help. I would like to use datagrid for data entry. How can I set the number of rows in the datagrid. And use the datagrid to update the ms sql table. regards...
2
by: OM | last post by:
I have two tables, one with categories in it, and only 3 records - Wages, Salary, Contract. I have a second table that records hours and numbers of employees in each category, per month. How do...
3
by: Ronald S. Cook | last post by:
I was told that if calling lots of records from the database (let's say 100,000), that the GridView's paging feature would automatically "handle" everything. But the 100,000 records are still...
3
juve11
by: juve11 | last post by:
hello, i have a vb application that writes into mysql (some kind of autocomplete). problem is that it writes too many rows and the app at a moment starts to run slowly.so an option that i thaught...
4
dlite922
by: dlite922 | last post by:
hey guys, I'm doing some brain storming and getting ideas to come up with a solution. I have a list of ....data... that is displayed 10 per page with the LIMIT clause. Simply put: My...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.