I am trying to put in a validation rule so that data in one field cannot be less than that in another.
e.g. i want to make a validation rule so that a phone call end time cannot be before the phone call start time.
Can anyone help???
I am trying to validate two fields in a form against each other. Neither are required, but If one is filled in, then the other must be filled in. If neither is filled in then they can both be blank. It is for a time, and description related to that time.
So if they enter in 5 hours, they have to type in the description field describing those 5 hours. If they type in the description field, they have to type in the hours. Vice versa. Or they can both be blank.
Right now I put in the table properties validation rule
([Other Description In] Is Null) Or ([Other Time In]>0)
This works half way. It stops them from putting in a description without time. but they can still put time without a description.
I can't figure out how to do multiple validations of the same two fields. If I do an And or another Or statement it breaks the whole thing and they can enter with no restrictions.
Also, I tired to do it at form level for the other half (to stop them from putting time without a description) but it brings up a pop up and they cant tab to the description field to enter a description without putting time back to "0" first.
I have a form that asks 2 questions. Date and Account. I need to check a table to see if the combination of both date and account have not been used. Date is normally today, can be yesterday. Account has a drop down menu with 6 choices. If both the date and account have been used then there should be an error shown to that effect. If not used, then proceed on to the next form for data entry.
I think that my problem is best explained by an example.
In the first field the user chooses between two options for the reporter. Field 1 - Reporter: Client OR Employee
If the user selects "Client" they have to enter an address, if they select "Employee" they don't have to enter an address.
So, what I hope is to create a form where if they select the "Employee" the address fields (address, city, state, zip) "gray out" and not accept any data entry.
I thought that my previous request on how to create a dependent combobox based on selections from two previous comboboxes, but the example provided only worked if the fields were all in the same table. Here is an explanation of my problem...I have 3 tables:
-FoodType -fruit -vegetable
Color green red yellow
FoodName apple banana cabbage green beans kiwi lettuce lime raspberries beets spinach star fruit strawberries squash tomato
I have 3 comboboxes on a form: cboFoodType, cboColor, cboFoodName.I would like to filter the value lists in cboFoodName based on the selections from cboFoodType and cboColor.For example, if I select "fruit" from cboFoodType and "red" from cboColor, I want the value list available in cboFood Name to consist of "apple;raspberries;strawberries".Likewise, if I select "vegetable" from cboFoodType and "green" from cboColor, I want the value list available in cboFoodName to consist of "cabbage;green beans;lettuce;spinach".
I have an ... interesting issue. I am wondering if others have dealt with this. I have a solution, but am not the happiest with it.
I basically have 2 databases here. (Or I will when I'm done making them) and one is dependent upon the other. In fact, the 2nd's tables are dependent upon the fields in the first database's table.
This database is for quality control checking purposes.
First off,
Database 1: Basically a list of standardized audits and what needs to be checked for those audits. What needs to be checked can change as things progress, but stays pretty standard.
Database 2: This will hold the checks that the QC branch will do, based on what type of Quality Check they are doing, they have an audit standard. This audit standard exists in database 1.
What basically ends up happening is that the data in Database1 become Table fields in database2.
Example:
Database1: Radio Check Audit Standard. Needs to check following: Process Specs EDMS Drawings Manuals SoP / Policy Used Radio callback Used radio during emergency Etc.
Another Random Check Audit Standard Needs to check the following Process Specs EDMS Drawings Manuals SoP / Policy Did something specific for this Audit Didn't do something else, also specific for this Audit. Etc.
Continue on with other Audits.
Database2: Will keep track of all the quality checks that have been preformed.
Today we will check Radio Protocol Did they: Process Specs EDMS Drawings Manuals SoP / Policy Used Radio callback Used radio during emergency Etc.
Yes, No as necessary.
2 Days later, we need to do another QC on the Radio Protocol Need to check if they did: Process Specs EDMS Drawings Manuals SoP / Policy Used Radio callback Used radio during emergency Etc.
Etc.
But what will be checked for in Database2 depends on what the standard is for the "Radio Check Protocol," or etc.
Right now, i see 2 options:
Option1 Make the 2 databases, and when a user "Picks" the Radio Check protocol, a linked table is filled with the Name / object that needs to be checked with a field in the same row to hold the data if the object was done / not done etc. The fields in Database1 are automatically put into this specific instance of Quality Check, etc.
Only problem with this: Requires coding to auto update. Easy to do, but if errors occur, things will screw up.
Option2: When the user picks the Radio Check protocol, simply allow a subform with a refreshed drop down box. Allow user to pick items they need (Limit it to only this Audit list, etc) to set to true. Assume false for other items not specifically chosen by user.
Problem with this: If an Audit standard changes to remove an item, or add item. Any quality checks done will also change for the assumed false items. If another Item added in, then all old QCs will now also have that item added in / reported assumed false. And if it is deleted, all old QCs will loose the item that was reported false.
I'm seen the first option as the only viable one.
Am I missing this, is there some other way to do this that would be better / wiser? Etc?
I have two tables in an Access Database- One is the chart of accounts, and the other is the actual entries, with the common field being ID. Chart of accounts is set up something like this-
ID Description 1000 Customer Revenue 2000 Office Expenses 2100 Paper
That kind of thing. Anyway, I want to set up the ID field in the entries table so that it is basically a pull down box that only allows you to enter one of the IDs listed in the Chart of Accounts. Any way to do this? I'd really hate to have to write a quick separate program to do this.
I want to create a different rowsource-query for a lookup field (field1) in each record in a subform. The rowsource changes dependent on the value in another field (field2) in the same record. How can this be done?
- I tried to change the rowsource-query in an eventmacro when the focus is set to field1, but this ofcourse changes the rowsource for all field1's and makes the allready selected values unvisible. - I think I have to include the value of record 'field2' in the rowsource query, but i cannot find a way to include that value in the query.
Something like:
Lookup field1 in the subform contains this rowsource - SELECT CUSTOMER.Id, CUSTOMER.AGE, CUSTOMER.NAME FROM CUSTOMERS WHERE (CUSTOMER.AGE= me![field2]); me![field2] however does not function
i have a database am working on in access 2010. I want a field to take its value based on another field's combo.Example;i have a checkbox field called "Loan" "Yes/No" and i have another textbox filed "Status" (which will hold eligibility). I want the Status to read Eligible when the checkbox is No and Non-eligible when its Yes
This may be a little difficult to explain but here goes:
I have a table in access 97 with the field Account. An account name is usually written as 0000000_A, but it MAY also have a secondary account and is usually written with the same first series of digits but ends in B e.g. 0000000_B. Therefore, we could have an account 0023654_A and 0023654_B.
Now for each account name there is another field called Items which are chosen from a combo box on a form (item 1, item 2, item 3, item 4, item 5, item 6, item 7 and item 8). An account may have more than one item.
Now if account B exists then it MUST contain the same entries as account A but can also have additional items. So we could have a situation where:
Now what I am trying to implement is that if the core items (these are those that are contained in both - which would be item 1, item 2, item 3 and item 4 in the above example) are changed in either accounts making them not equal then a warning message should come up stating so. IT IS IMPERATIVE THAT THE CORE ITEMS ARE PRESENT IN BOTH.
I have some experience in Access 97, but unsure of how to tackle this. Could somebody please guide me ???
I have a table called welding, I want to create a user friendly form for input. The database ultimately wants to go on share point so I am building it in the web database option.
One of the fields is called location, if the location is 'Field' I want 10 more fields to appear for data entry such as weld reason, rail temperature etc . If the location is 'Depot' I want these fields to be hidden as they aren't relevant.how would I do this?
Hi, I've got a close button on my form as follows: Private Sub exitForm_Click() DoCmd.Close End Sub
In the beforeupdate event of the form I have have following code to validate the forms fields:
Private Sub Form_BeforeUpdate(Cancel As Integer) 'Place an asterisk (*) in the Tag Property of the text boxes you wish to validate. 'Then in the BeforeUpdate Event of the form, copy/paste the following:
Dim msg As String, Style As Integer, Title As String Dim nl As String, ctl As Control
nl = vbNewLine & vbNewLine
For Each ctl In Me.Controls If ctl.ControlType = acTextBox Then If ctl.Tag = "*" And Trim(ctl & "") = "" Then msg = "Data Required for '" & ctl.Name & "' field!" & nl & _ "You can't save this record until this data is provided!" & nl & _ "Enter the data and try again . . . " Style = vbCritical + vbOKOnly Title = "Required Data..." MsgBox msg, Style, Title ctl.SetFocus Cancel = True Exit For End If End If Next End Sub
This validation works fine up to a point. If I try to close the form and a required field is empty, I get a message box asking me to fill in the data. The problem is that when I click ok to the message, it shuts down the form, so I have to re-enter all the data again. My question is how do I prevent the form from closing after clicking ok on the message box?
Is there a way to make a field on a form dependent on what the user selects from 2 other cbo? By that I mean I would want the user if they selected in cbo1 Easter and they select cbo2 Regional President in the form field I would want it to auto return the name John Smith because in my table he is the Eastern Regional President. I am not sure if I can do this by query or is there an easy way to do this?
Validating field from a query. I have a table with a field that has a value number that I need to validate that that number exist in another table in a field
Table1.field1 Number Table2.field1 number
So let's say a have in table2.field1 the list 1 2 3 4 5 8
In table1.field1 I need to validate that the number I enter is present in table2.field1 so 1 would be ok but 6 invalid and it can't be a from list statement because I need the person to enter a number and get no error or get invalid number.
If I have a Form that is used to populate a Table can I make one field entry dependent upon another?
For example, if I have a field for Discipline (with values such as Mechanical, Electrical, Piping) and another field for Equipment Type (with values such as Motor, Gearbox, etc) can I set up the Form so that when I select Electrical for the Discipline, only electrical items (such as Motor) are available to select for the Equipment Type field?
Using the table below as an example, if I select Electrical for the Discipline field in my Form, when I go to select a value for the Equipment Type field the drop down shows only Motor and Fan?
Discipline Equipment Type Electrical Motor Electrical Fan Mechanical Gearbox Mechanical Pump Piping DN 150 Pipe
Or, better still, can I set it up so that if I select Motor for the Equipment Type field, the Discipline field will automatically be populated with Electrical?
I would like to display the value of a field [Name] based on the value of another field in the same Table [Position] in a report. My goal is to have a visual representation of data that changes based on the changes to the value of the [Position] field.
Hi. I'm unable to work out how to set up a query which will filter records according to what is returned by one control, but will also list all records if the value of the control is null.
Situation: I have a CONSULTATION table linked many to many via a CONSULTATIONLIST relation table to an ADVISOR table. (An Advisor may be present in any number of Consultations, and a Consultation may include any number of Advisors.)
I have a CONSULTATIONMANAGE form enabling the user to select an Advisor from the table ADVISOR via a combo box called SELECTADVISOR which returns Advisor ID (adID).
My CONSULTATION form, displaying the list of consultation records, currently has, as record source, the following query:
SELECT Consultation.*, Advisor.adID FROM Consultation INNER JOIN (Advisor INNER JOIN ConAdList ON Advisor.adID = ConAdList.adID) ON Consultation.conID = ConAdList.conID WHERE (((Advisor.adID)=[Forms]![ConsultationManage]![selectadvisor]));
This query correctly lists only those Consultations in which the selected Advisor was present.
Problem: What I also need to do is show ALL Consultation records if the user does not select an Advisor from the combo box.
so i'm trying to create a report that only displays certain fields per record based on another field in that record. To clarify: [Type] is a numeric field holding either 1, 2, or 3. I have a function that is instructed to display (ie, change from not visible to visible) a certain combination of fields depending on the number in [Type] when the form is opened. I assume I would have to go through all the records individually (do loop until), but i'm not sure if this works in a report.
is there any way to have different fields displayed for different records within the same report??
Is it possible to use date dependent field names in a query?
I have this table and there are columns based on year and month (formate of names is: 2014,01) I need to select the columns of last month and then 4 months further down in history.
Is there a way to do that as the information in those columns I need to make calculations and graphs with.
Hi, I've got a data entry form where orders can be created. Within this form there is a ComboBox which is used to search for items and stores the selected item ID in the Order table. However the field for storing the Unit Price relating to the selected item is currently manually enterable. Where as I would like this to be dependent on the item selected within the ComboBox and updated automatically.
At the moment I've added an extra colum to the ComboBox to retrieve the relevant Unit Price and I can show this in a normal seperate text box using '=Combo27.Column(1)' as the ControlSource.
How can I get rid of the text box and incorporate the code into the current UnitPrice field so as it inserts the relevant record (price) into the UnitPrice coloumn of the Order table?
I am attempting to open a website hyperlink, some of the fields contain https:// and some of them dont.
Code: Private Sub Facebookbut_Click() Dim Hyper As String If InStr([TEAMFacebook], "https") Then Hyper = Me.TEAMFacebook Else Hyper = ("https://www.facebook.com/" & Me.TEAMFacebook) End If Application.FollowHyperlink Hyper End Sub
So far this does 2 things, it doesn't open any hyperlinks at all and continues to attempt to until the program is closed from task manager. Before I had this error it would open the hyperlink twice if the field does not contain "https" and the IF statement was passed to the 2nd option.
I there a way to determine whether or not my checkbox within a form is ticked or not dependent on another value within a field?
I have a field called 'DaysRemaining' and another check box field called 'Expired'. I want the expired checkbox to be ticked if the value within 'DaysRemaining' is '<0' and unticked if '>=0'. Is there a way i can do this within the control source of my check box?
I have a database of purchase orders Many of the purchase orders have a revision No against them, eg:-
Purchase Order No / Line No / Revision No / Value 1001 / 001 / 00 / £50 1001 / 001 / 01 / £100 1001 / 001 / 02 / £200
I am trying to find a way to write a query that will show me the actual value of the final revised value of each Purchase order line ie: the answer to above is