Automatic Update For A Field Depending On The Value Selected In Another Field.

Mar 28, 2007

tblAppointment will take register appointments.

tblTreatment contains Cost for different AppointmentTypes.

The above two tables are linked as 1-M relationship (1 Treatment can have Many Appointments)

Entering data in the tblAppointment - AppointmentType and AppointmentCost are the fields in tblAppointment. AppointmentType a drop down box, so that a specific AppointmentType can be selected.

Problem: Now depending on the AppointmentType selected the AppointmentCost field should automatically display the correct Cost.

Can anyone help please?

Thanks

Paz

View Replies


ADVERTISEMENT

Forms :: Automatic Population Of Field When Name Is Selected

Mar 20, 2014

I am putting together a simple database to do with monitoring maintenace of buildings. I was the building number to automatcially populate when the building name is select.

I have got the the point where I have building name and number in the building name combo box but i'm stuck with the after update code builer part.

I currently have:

Me.Building_NameControl = Me.Building_Number.Column(2)

But doesn't seem to work.I don't really understand syntax!

View 12 Replies View Related

Update Field Automatic !!!!!!

Nov 23, 2007

I don't now how to update field automatic when new record in another table entered.

I now I suppose to use update query by SQL language when I want to make that , but I can't configure the query.

I want any example for that problem .

View 9 Replies View Related

Automatic Field Update

Mar 4, 2005

I have a form (Access 2000) on which one of the fields shows the date on which the record was last updated.

The idea is that when the the form is closed (or the user navigates to another record), this field is automatically set to the current system date, but ONLY if any of the other fields on the form have been changed. If the user has merely viewed the form without changing any data, then the 'Date Updated' field would not be changed.

I'm sure this is a common enough scenario, but I'm struggling! Any suggestions most gratefully received!

Thanks.

Mike

View 5 Replies View Related

Update Field Depending On Date

Dec 5, 2005

Hi

I wonder if anyone can help me out on a db i have inherited. Basically I need to add a field to a table and backfill the field with a number depending on a date field.

The new field (CallID) needs to record the order in which calls are received on a certain date (CallDate in the table). So for example the first call on 1/3/05 CallID=1, the second on 1/3/05 CallID=2. The following day CallID restarts at CallID=1.

So I'm looking for an update query which will set CallID for the several hundred existing records in the database. If anyone can help with a pointer or too, or example SQL, I would be very grateful

Cheers

View 4 Replies View Related

Text Field Update Depending On List Box Value

Aug 19, 2005

I realize there are several threads already dedicated to this particular topic but my situation is slightly different... First, my tables are set up like so:

tblStudent(studentID,LName,FName,MI,Gender)
tblRack(rackID,roomID,studentID,rackNumber)
tblRooms(roomID,roomNumber)

There are 3 racks to a room and a total of 90 rooms. A room can hold up to 3 students. A list box holds values that I have typed in (the room numbers). I went with typing them in rather than pulling them from a query because of the way my tables are set up. If I pull from a query as the tables stand, room numbers show up 3 times, once for each rack. I want to be able to fill in text boxes with information on students assigned to the room I choose from my list box (FName, LName, etc...) I'm kind of at a loss here on how to go about getting the info that I want. Using the column property to populate text fields is probably going to be much easier but a query is needed (I think) and using a query causes room numbers to show up 3 times in my list box... Anyone want to throw me a bone?? Thanks! :)

View 2 Replies View Related

Forms :: Allowing Different Values In One Field Depending On Selected Values Of Another

Nov 22, 2013

I have several result fields which are all drop down lists. I want each result field's drop down list values to be different depending on the selected value of the Test1 drop down list.I came up with using the .rowsource keyword. My syntax seems to be fine but I'm not getting any values under the result fields when I run the form.Here is my code so far:

Private Sub Test1_AfterUpdate()
If Me.Test1 = "Stress Echo" Or Me.Test1 = "Stress SPECT" Or Me.Test1 = "Stress PET" Or Me.Test1 = "Stress MRI" Then
Me.Test1Result2.RowSourceType = "Value List"
Me.Test1Result3.RowSourceType = "Value List"

[code]...

View 14 Replies View Related

Queries :: Append Query - Automatically Update Tables Depending On Value Of Yes / No Field

Feb 25, 2014

I am giving two tables and I need to create a macro that automatically updates these tables depending on the value of a Yes/No field. If it's No, it's in the 1st table TableOne, if it's Yes it automatically updates to TableTwo.

So, the best way I saw to go about is to set up an append query and then create a macro that runs it

So my tables have the values FirstName, LastName and isValid (more but keeping it short)

So for my append query, I put TableTwo in the pop up I get. Then, where it asks for the field I put it

Field:FirstName
Table:TableOne
AppendTo:[TableTwo].[FirstName]
Criteria:[TableOne].[isValid] = 1

I do this for all (it was autocompleted except the Criteria field). I tried to keep Criteria with data only for isValid but that didn't work. I wrote it for all the field names, still didn't work. Whenever I click run it says it'll append 0 rows.

View 5 Replies View Related

How Do I Update A Field With A Value Selected From A Combo Box?

Nov 13, 2004

Hi Everyone.. or anyone!

I have a date field called 'CDDueDate' on a form called Diary, based on a Diary Query, based on the Diary Table. I have a combo box that lists dates generated by SQL to select from. It has no control source, i can see dates from today till the end of 2005 in the Row Source and the type is set to Value List.

Once I have selected a date, how do i get it to store it in my CDCueDate field. It doesn't save to the underlying query or table?

I tried setting the Control Source to CDDueDate thought the combo is called cboDateSelect, but it comes up with Msg "Write Conflict, da dee da, with Save Record, Copy to Clip Board or Drop changes".

If i click Save Record, a msg comes up;

"The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing Microsoft Access from saving the data in the field.

If this is a macro, open the macro in the Macro window and remove the action the forces a save (for example GoToControl).

If the macro includes a SetValue action, set the macro to the AfterUpdate property of the control instead.

If this is a function, redefine the function in the Module Window."

If i follow the instructions in this message, the combo box stays blank no matter how much i select a value.

If i click ok again, it comes up with "Update or CancelUpdate without AddNew or Edit". And if i click ok again, it comes up with, Microsoft has encountered and Error.. da dee da, prompts to create backup and send error report.

Does anyone have any ideas?
freespirit

View 5 Replies View Related

Need To Update A Field Based On Selected ControlSource

Mar 31, 2008

I have a combobox that selects the customer and shows related information on that customer such as phone number, cc#, etc..

now the trick is i need to allow the selected member to be added to the order information.

For instance, the user selects the customer "Bob" and bobs information is displayed to check for accuracy. After the info is approved the user will continue to process his order. In order to do this I need the customer ID to be the same as the selected customer in the combobox.

Then the user will proceed to fill out the order information, location, date, time, etc.

How can I go about doing this?

Thanks in advance

View 2 Replies View Related

Limit A Field To User Defied Values Depending On The Input Of Another Field.

Nov 23, 2005

Hey all,

I have two fields 1 & 2

field 1 is a simple combo list of user defined values ie A, B, C or D

Field 2 relates to a attribute of the data in field 1 and is not always the same for A, B, C and D. i.e

A could have a,b,c,d or e
B could have c,e,f,g or h
C could have a,g,h,i or j
D could have v,w,x,y or z

I would field 2 to have a combo box which only displays a,b,c,d, or e when A is chosen in field 1; c,e,f,g or h when B is chosen; etc

How do I do this?

Cheers all,

Matt :confused:

View 2 Replies View Related

Forms :: Limit Form Field Selection Depending On Another Field

Feb 5, 2014

I am creating a training database and first I have tables in relationship to the courses:

tbl_Courses
Course ID (Primary Key)
Course Title
Objectives

Instructors (lookup field allowing multiple instructors to be selected, meaning they are skilled to teach the course)

tbl_Instructors
Instructor ID (Primary Key
Last Name
First Name
Full Name (Caluclated to put Last Name, First Name)

[code]....

What I am trying to do on a form to create a new event is once the user selects the Course from the Course ID combo box, then I need the Instructor combo box to only display the instructors who are skilled to teach the course which are selected in the tbl_Courses.

I can get all Instructor ID's, but not the names and the class that has multiple instructors show on one line.Should I have not put the Instructors field in the tbl_Courses? Do I need another table for instructor skills or something?

View 1 Replies View Related

Access 2007 - Autofill A Form Field Depending Upon Value Of Another Field

Feb 20, 2012

I am new to Access 2007 and I am having trouble in creating a form. It is simply a data storage table which would be fed in by users. That it.

I need to create a user friendly form so that :

When the user selects : Career_Goal field as "None", the next field called: Years, should be automatically be populated as 0.

In any other case, they should be able to select the years from the dropdown list.

How do I create this if else conditions? Do I use expression builder, if yes then how?

View 1 Replies View Related

General :: How To Limit The Options Of A Field Depending On Another Field

Nov 26, 2012

In one table I want to limit the options of one field depending on what is chosen in another field.

Field Type has two options: Receivable and Payable.

I want field Sybtype with this limits:

If Receivable is chosen in Type field you will only have CreditCard & Lockbox available in the Subtype field. If Payable is chosen you will only have Cheque & Transfer to choose.
Shall I have two separate tables? or only one table with Type and SubType as below? but then how can I make the above work?

Type SubType
Receivable CreditCard
Receivable Lockbox
Payable Cheque
Payable Transfer

View 2 Replies View Related

How To Link A Field To Another Depending On Information Filled In One Field

May 13, 2013

I have a couple of fields in Access. To explain I will show here the fields I have and their datatype

ID: Autonummer

Amendment: Text
Basis info: Yes/No
Sex: Yes/No
Period: Yes/No
Salary:Yes/No
Shift:Yes/No

Now, in the amendment field, I've inserted a combo box, with 3 options in it. Let's say option A,B and C...The thing I want access to do, is, when option C is selected, I want fields Period, Salary and Shift to be automatically "Yes".But if option A or B is selected, the the user must choose what the other fields are going to be either Yes or No

View 8 Replies View Related

Query To Calculate Field Depending On Value Of Another Field?

Oct 13, 2005

hey guys . .

I have 3 fields: TEST, NETQTY, EXTENDED

NETQTY usually = EXTENDED depending on the TEST

BUT the Test PTCGCD has a EXTENDED value that is TWICE the value of NETQTY

How do i create a query which will update the EXTENDED field depending on the TEST value>?

For Example:

The general TESTS: AFP, ANAS, CYC etc . . EXTENDED = NETQTY(1)

PTCGCD: EXTENDED = NETQTY(2)

?

View 1 Replies View Related

Tables :: Linking Multiple Field Values To A Field Selected From Combo Box

Feb 16, 2014

I'm pretty good with setting up a very simple database such as inventory, profiles, etc.. However I'm creating a database to keep track of a football (soccer) team's players and match statistics.What I have so farsample attached)

Tables:
* Players - PlayerID, Fname, Lname, position, goals, assists, etc (all details regarding a player)
* Position - Positons (Table containing positions eg: defender. Data is selected in player's form as a combo-box)
* Competition - Competition types (Cup, League, Friendly. Data is selected in Match's form as a combo-box
* Venue - similar to Competition table
* Opponent - Similar to above two tables
* Match - MatchID, Competition, Venue, etc (form corresponding to table attached)

Forms:
* Player form
* Match form

Now as shown in the sample, I choose players using the combo-box. Then whatever stats they had during the match are entered on the fields provided. How to link the player (selected using combo box) to the stat fields (goals, assist, YC, etc).

View 1 Replies View Related

Filetering A Field Depending On Another Field

Sep 6, 2005

Hi

Not sure if this is a form or table query, so here goes...

I have an invoice table and then an invoice line items table.

In the line items table I have field 'work order number' i.e. each line item will have a corresponding work order number. The db at the moment gets these numbers from a look up table and that table also has a description for that work order number i.e. nr 123 is for surveys and studies.

Now surveys and studies may have three sub headings but the work order number is an umbrella for the main task description and sub taks. The sub taks do not have there own number and at present i can not give them there own number.

Becasue you may have upto 10 different work order numbers for a project and upto 5 sub headings this equates to 50 + sub headings. What I would like to be able to do is that when the work order number has been chosen this filters out the sub headings belonging to that work order.

I am just unsure how to set this up as at present the work order number is a look up with the main heading.

Do I make work order a table in its own right and link that to the line items and then have a lookup for sub headings linking to the work order table??

Thanks for your help.

reading this back it does sound more like a table query??

Kind regards

scott

View 1 Replies View Related

Applying Filter With Selected Field Based On Another Field

Apr 30, 2015

I have a login screen to open a form. I would like to filter the form based on what user logs in. In my tbluser, I have a trainer name, a UserLogin, and a password. I would like the form to filter on trainer name based on userlogin.

I know the code: DoCmd.ApplyFilter , "Trainer = 'Joe Smith'" but how to I edit the code to change as the tbluser changes?

View 1 Replies View Related

Field Populates Depending On Cbo 1 And 2

Nov 25, 2005

I would like my form field to populate based on what the user selects from 2 combo boxes I have. I have a table set up with Region, Position, and Name. I would like when the user selects for example Eastern for the region and President for the position that John Smith would auto populate in the form field. Is this possible and if so, how can I get this to work?

View 1 Replies View Related

On Exit Changes Another Field Depending On Value

Apr 4, 2006

I am working on adding the function of adding a date to a field on a form On Exit from another field. If the field I am exiting has a value of "No" i want to add the current date and if it is "Yes" I want to make sure the other field is null. I can't seem to find how to do this effectively. Can someone help me here?

View 2 Replies View Related

Automatic Field Completion

Jun 23, 2007

Ok, i'm very new to access, so please be patient!

Right, disclaimer over, hopefully someone can help me with this.

Essentially, I have a table of employees who have something called an OUC - this is a group identifier which allows us to recognise certain info about them. The first three digits relate to the line of business (LOB) that the employee is in.

ie. John Doe - JPGA2X; Joe Bloggs - JPGB3Y; Frank McRank - JDH3B;

John Doe and Joe Bloggs both are in the IT LOB (as defined by JPG), and Frank is in Finance (as defined by JDH).

I currently put the OUC in the employee table, and have got a translation table for OUC->LOB (ie the left three digits of ouc's, and how they equate to the correct LOB). What i can't work out how to do is get the two tables to interact. How do i get the employee table to automatically work out which LOB the employee is linked to?

I hope this is clear, and that someone is able to work out why i am being such an idiot about this! (it's probably basic principles of Access that i've skipped over in my haste!!).

Thanks in advance,

Ferg.

View 3 Replies View Related

Help With Automatic Date Field

Jul 10, 2007

Hello all how are you? im kindda new in the are of access(2 months)
Im making a db for company which its purpose is salary managment.

now i have a basic question

I have a table named Months which hold parameters like: "price of food","Car Value" and more..

I have field named: "Month and Year" and i want that the default value of this field would be the last month plus 1.

for example: if the first record in "Month and Year" is--> 07/2007
the second record would be 08/2007.

i have tried to use the default value in the tbl properties but it didn`t work for me

hope you can help my guys . thnaks

View 6 Replies View Related

Queries :: Sum A Field Depending On Date

Aug 21, 2014

The following code should sum a field depending on the date. The field IncidentYear is created and set to Last, This or "-" depending on the date. I should get three rows, one for each of the three values..

I get..... you tried to execute a query that does not include the specified expression as part of an aggregate function

I'm sure I've missed something obvious and I can't see it! If I remove the group by clause and the sum field..... it works.

SELECT IIf([Incident Date]>=#01 July 2012#And [Incident Date]<=#30 June 2013#,'Last',
IIf([Incident Date]>=#01 July 2013# And [Incident Date]<=#30 June 2014#,'This','-'))
AS IncidentYear,
Sum(tbl_2c_Acc.[Vehicle Off Road Time]) AS VOR_Acc_Days
FROM (tbl_2c_Acc
LEFT JOIN tbl_Value_Proposition
ON tbl_2c_Acc.Lessee = tbl_Value_Proposition.[Lessee No])
LEFT JOIN tbl_Vehicle_Type
ON tbl_2c_Acc.[Vehicle Reg] = tbl_Vehicle_Type.[Reg No]
GROUP BY IncidentYear;

View 8 Replies View Related

Email A Certain Report Depending On Value Of A Field

Feb 11, 2015

I have a button setup to email a Proposal Report to specific people. Works fine. I now need the ability to email the Proposal Report (without an addendum) OR email the Proposal Report with an addendum. There are additional fields on the report with an addendum. I have tried the on format event of the Proposal Report to make the addendum fields invisible using this if statement:

Code:
if Forms![CurrentJobs]![Addendums].Form![AddendumNum] Is Null Then
Me.AddendumNum.Visible = False
Me.Label324.Visible = False
Me.Label325.Visible = False
Me.AddendumDrawings.Visible = False
Me.AddendumDrawingsDate.Visible = False
Me.Label326.Visible = False
Me.AddendumFloors.Visible = False
Me.Label327.Visible = False
End If

But I keep getting an "object required" error. how I can run the Proposal Report with or without addendum information depending on the job?

View 6 Replies View Related

Automatic Count Of Field Contents

Jan 11, 2007

My company requires a query to aid distribution, however I am experiencing some problems implementing the system.

We have purchased a large database of addresses and need to be able to query a town/street to find out how many houses are in that street.

I have the query and form set up to display the street/town and list of house numbers when searched for, however the houses are grouped by postcode rather than street, with multiple house numbers in the same field (see example).

Street
Main Avenue

POSTCODE
HG23 0DF

Houses
89;91;93

POSTCODE
HG23 1DF

Houses 95;97;98


----

Basically, I need a total of how many individual houses there are in a street, regardless of postcode. In this case, it should treat the ";"s as dividers and return the result of '6'. Or in some cases ignore the semicolons as some fields look like ";;;;;;;;13". It should then add both the total for one postcode to the other postcode to display a complete total of houses in one road.

Can anyone make any suggestions?

Thanks in advance,
Matt

View 1 Replies View Related







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