473,549 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restrict field selection based on criteria in ms access

5 New Member
i have an employee table which has a field named department.i want the users to receive a message that no more employees can be assigned to this department because a certain limit has reached.the users will be using forms in ms access to insert the details.is it possible to do so using vba?

What I have tried:

i have created a query which calculates the current no of employees in department.the limit lets say currently is 5,more than 5 employees in a department is not allowed.i tried validation criteria on table level but no luck there as the expression is wrong.
Oct 1 '20 #1
0 2747

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

Similar topics

2
1647
by: Big John | last post by:
Is it possible to open an input window by selecting a lookup criteria from a field in a table eg if a lookup field in a table has choice A, B, C, and one selects "B", can this be used to open a window with an input field for anothe table big John *** Sent via Developersdex http://www.developersdex.com ***
9
1542
by: mukeshhtrivedi | last post by:
We have MS Access 2000 Application (on Network- file server) and it workd fine as intended. However in one of our Windows XP computer (workstation) in bookd jobs module 10 digit field shows 8 digits only and than we need to scroll with cursor to see last two digits. I have tried to change the display settings of monitor and even I replaced the...
2
1832
by: mnms | last post by:
Hi, I'm trying to create an "overview" form. And I haven't been able to figure out how to get Access to do what I want yet. Basicly what I want, is to populate a subform based on a field selection. In other words, I have several fields like colour, shape, location etc. on my Main form. Now I want to add a subform to my unbound mainform,...
1
1660
by: imwhiteandnerdy | last post by:
i'm hoping I can get some help with adding my combo box selection to my access database.Any Help would be appreciated. I've been told I need complex binding Basically I just want to add the selection to the database field DATABASE =cc TABLE =customer FIELD IN DATABASE= custCity COMBO BOX =cboCity My combo box name is cboCity Has the...
9
3840
by: Brett_A | last post by:
I have a form where the first field is a dynamic drop-down that pulls from a db (Access). The fields associated with the query are task_id, task_name and task_rate. The field has the value of "task_id" and the label of "task_name". In the second form field, I would like the default value to be determined by the selection made in the first...
4
8005
by: learnaccess3 | last post by:
I am using a simple query (i.e.) select query taking soem fields , & binding with the controlsource property of the textbox. But I am unabel to edit the same same .Erroe Message when try to enter in that box "Field is based on Expression and can not be edited" . After clicking on button I am dispalying teh data on 1 form, but some of teh...
2
1953
by: ziccardi | last post by:
When my query is executed it produces no results. However, if I copy and paste the criteria from the information populated and referenced in my query, it works fine. The criteria needs to be numbers. eg. In (1,2) The text in my criteria field is: In (!!) Here is the code: Private Sub VIEW_NewRate_Click() On Error GoTo...
4
5738
by: cppd123 | last post by:
I have a database with 20 fields/columns. Normally when I generate the data with a form, all the 20 fields will appear on the table. Now i want to use checkbox to allow user to choose which column to appear. I have got this: Private Sub genQuery()
3
1325
by: saralouna | last post by:
hey i need ur help please it's my first time working with vba and access and i want to program an access form for multi search i have the type of contract as a combo box if i select type of contrat as "credit IMMO" it displays automatically an other zone of txt,and i need a code that according to the type of contract selected and the other...
0
7548
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...
0
7472
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...
0
7986
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7832
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...
1
5391
isladogs
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...
0
5114
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...
0
3499
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1965
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
1
1083
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.