Validating A Field (dependent Fields)

May 28, 2005

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???

View Replies


ADVERTISEMENT

General :: Validating Two Fields Against Each Other?

Oct 9, 2013

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.

View 5 Replies View Related

Validating Data In 2 Fields At Same Time

Apr 4, 2005

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.

Can this be done? And how?

View 1 Replies View Related

Tables :: Dependent Fields - If One Is Other Will Be No

Dec 6, 2014

I have a table with 3 yes/no fields. I need them to be dependent on each other meaning if one is yes the others can not be yes. How can I set this up?

View 5 Replies View Related

Dependent Fields In Access Forms

Sep 14, 2004

Hello All -

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.

Any help would be SO appreciated!

Thanks -
Amy

View 1 Replies View Related

General :: How To Create Fields Dependent On Each Other

Jun 19, 2012

I am very new to Access and I am not familiar with SQL. How I can create fields that are similar to each other?

Let's say I have 3 fields in my table: Name, State, Area Code.

I want it so that each time I select "Name" the appropriate State and Area Code populate. Anyway I can do this?

View 3 Replies View Related

Dependent Combo Boxes With Fields From Different Tables

May 16, 2012

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".

View 2 Replies View Related

Forms :: Validating Text Field On Form Against Another Field In Same Record?

Apr 17, 2014

I have a form where I would like to validate (restrict) choices in subsequent fields.

Example

Combobox choices are Air, Fire, Water, Earth, Space

In the form I have 4 fields = Material1, Material2, Material3, Material4. (all in same record on my table)

Basically I need the validation to not allow duplicates across the 4 fields.

something like....

[Material1] <> [Material2] or [Material3]or [Material4]

I am not sure of the proper syntax for the validation field in the Form Properties. Or if I am even putting it in the right place.

View 3 Replies View Related

Table Fields (Name / Number) Dependent On Another Tables Data.

May 18, 2006

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?

Kelemit

View 14 Replies View Related

Validating A Field In Access

Oct 27, 2004

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.

View 6 Replies View Related

Rowsource Of Lookup Field Dependent On Field Value In Same Record In Subform

Jul 6, 2014

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

View 5 Replies View Related

Tables :: Validating A Field Using Another Checkbox Field

Apr 17, 2013

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

View 3 Replies View Related

Comparing DB Entries Within A Field And Validating Them

Sep 25, 2005

Hi,

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:

0023654_A
item 1
item 2
item 3
item 4

0023654_B
item 1
item 2
item 3
item 4
item 5
item 6

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 ???

View 1 Replies View Related

Showing Field Dependent On Previous Field In A Form?

Oct 24, 2012

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?

View 14 Replies View Related

How To Stop A Form From Closing After Validating A Field

Jun 12, 2006

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?

appreciate your help:)

View 1 Replies View Related

Form Field Dependent On Cbo

Nov 23, 2005

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?

View 3 Replies View Related

Tables :: Validating Field - If Number Exist In Another Table?

May 1, 2013

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.

View 2 Replies View Related

Forms :: Make One Field Dependent Upon Another

Nov 2, 2013

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?

View 4 Replies View Related

Reports :: How To Display One Field Dependent On Another

Nov 21, 2014

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.

View 3 Replies View Related

Returning All Records If Dependent Field Is Null

May 14, 2007

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.

Any help would be much appreciated.

Mat.

View 2 Replies View Related

Record-Dependent Field Display In Same Report

Nov 2, 2004

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??

Thanks

-Jason

View 4 Replies View Related

Queries :: Use Date Dependent Field Names?

Mar 4, 2014

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.

View 14 Replies View Related

Field Dependent On ComboBox For Data Entry Form

Mar 16, 2005

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?

Any help on this would be much appreciated!

View 1 Replies View Related

Modules & VBA :: Opening Hyperlink Dependent On Field Data?

Aug 18, 2015

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.

View 14 Replies View Related

Forms :: Check Box Within A Form Ticked Or Not Dependent On Another Value Within A Field?

May 10, 2013

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?

View 1 Replies View Related

Purchase Orders And Lines - How To Make The Sorting Of 1 Field Dependent Upon Another

Dec 12, 2006

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

1001 / 001 / 02 / £200

Could anyone please help?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved