473,761 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update Table or Form Field Based on Previous Field

I'm sure this has been covered before in the newsgroup but have had no
luck locating it.

I have two tables: InstMonitors & MonModDesc

Structure of MonModDesc:
Model, Description

Structure of InstMonitors:
CompName, Make, Model, Description, Serial, PurchDate, WarrExpDate

The MonModDesc table is simply a listing of the Monitor Model Numbers
and associated Description with that Model Number.

The InstMonitors table is a tracking of activity of the specific
monitor: CompName is the name of the computer it is assigned to. Make
is the brand name of the Monitor. Model is selected from the
MonModDesc table. Serial is the serial number of the monitor.
PurchDate is the purchase date of the monitor, WarrExpDate is the date
the warranty expires on the monitor.

What I am trying to do is:
When a user is in the InstMonitors table, and they select a Model
(coming from the ModModDesc Table), I would like the Description
associated with that Model from the MonModDesc table to flood in to
the Description field in the InstMonitors table.

I am thinking from researching that this may not be able to be done in
a table and will have to be done in a form, which is absolutely fine
because a user won't be entering data directly into the table, they
will be using a form.

Thanks,
Mike
Nov 13 '05 #1
2 4339
"Mike" <mb********@cha rter.net> wrote in message
news:70******** *************** **@posting.goog le.com...
I'm sure this has been covered before in the newsgroup but have had no
luck locating it.

I have two tables: InstMonitors & MonModDesc

Structure of MonModDesc:
Model, Description

Structure of InstMonitors:
CompName, Make, Model, Description, Serial, PurchDate, WarrExpDate

The MonModDesc table is simply a listing of the Monitor Model Numbers
and associated Description with that Model Number.

The InstMonitors table is a tracking of activity of the specific
monitor: CompName is the name of the computer it is assigned to. Make
is the brand name of the Monitor. Model is selected from the
MonModDesc table. Serial is the serial number of the monitor.
PurchDate is the purchase date of the monitor, WarrExpDate is the date
the warranty expires on the monitor.

What I am trying to do is:
When a user is in the InstMonitors table, and they select a Model
(coming from the ModModDesc Table), I would like the Description
associated with that Model from the MonModDesc table to flood in to
the Description field in the InstMonitors table.

I am thinking from researching that this may not be able to be done in
a table and will have to be done in a form, which is absolutely fine
because a user won't be entering data directly into the table, they
will be using a form.

Thanks,
Mike


You don't need the Description field in the InstMonitors table. It merely
duplicates data that is already in the MonModDesc table, and as such
contravenes the basic principles of data design.

So, remove that field! Then, create yourself a form bound to the
InstMonitors table. Add a text box to this form for the Description, and
set the Control Source for this text box to the following:

= Dlookup("Descri ption","MonModD esc","Model = " & [Model])

This assumes that Model is a numeric field. If it is text, do it like this
instead:

= Dlookup("Descri ption","MonModD esc","Model = """ & [Model] & """")
Nov 13 '05 #2
BEAUTIFUL. Thanks! Works Like a Dream!

"Brian" <bc**@IHATESPAM clara.co.uk> wrote in message news:<10******* *********@echo. uk.clara.net>.. .
"Mike" <mb********@cha rter.net> wrote in message
news:70******** *************** **@posting.goog le.com...
I'm sure this has been covered before in the newsgroup but have had no
luck locating it.

I have two tables: InstMonitors & MonModDesc

Structure of MonModDesc:
Model, Description

Structure of InstMonitors:
CompName, Make, Model, Description, Serial, PurchDate, WarrExpDate

The MonModDesc table is simply a listing of the Monitor Model Numbers
and associated Description with that Model Number.

The InstMonitors table is a tracking of activity of the specific
monitor: CompName is the name of the computer it is assigned to. Make
is the brand name of the Monitor. Model is selected from the
MonModDesc table. Serial is the serial number of the monitor.
PurchDate is the purchase date of the monitor, WarrExpDate is the date
the warranty expires on the monitor.

What I am trying to do is:
When a user is in the InstMonitors table, and they select a Model
(coming from the ModModDesc Table), I would like the Description
associated with that Model from the MonModDesc table to flood in to
the Description field in the InstMonitors table.

I am thinking from researching that this may not be able to be done in
a table and will have to be done in a form, which is absolutely fine
because a user won't be entering data directly into the table, they
will be using a form.

Thanks,
Mike


You don't need the Description field in the InstMonitors table. It merely
duplicates data that is already in the MonModDesc table, and as such
contravenes the basic principles of data design.

So, remove that field! Then, create yourself a form bound to the
InstMonitors table. Add a text box to this form for the Description, and
set the Control Source for this text box to the following:

= Dlookup("Descri ption","MonModD esc","Model = " & [Model])

This assumes that Model is a numeric field. If it is text, do it like this
instead:

= Dlookup("Descri ption","MonModD esc","Model = """ & [Model] & """")

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3544
by: jpr | last post by:
Hello, I know that this is not the rule but need some help. My datbase has three tables: MASTER TEMPLATES FORMS I have a form which is based on a table named MASTER. I have a primary key set to autonumber and a field SSN which I would
2
19608
by: Brett | last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a record in table2, then the not null fields in table1 that correspond to the records in table1 needs to be updated to match the field in table2. What I have is a form that is linked to Table2. If the users want to change a field in the main database (table1), they fill the change in to the form (which is linked to table2) If there is no change to the field, they simply...
16
3497
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record in a hidden field) I wish the user to be able to edit the data in the table, so I have extracted the records into hiddenfield, textareas, dropdown list and checkbox so that they can make changes. I named these elements as arrays and wish to run an...
4
12288
by: ormor | last post by:
Hi friends, I am new to MS Access. I have desiged a Form wherein I would like to update the field based on some calculation derived from the previous fields. How this can be done. I want to update/write into the table against Tax field the value that was calculated based on the field 'Gross'. Example, Gross * .02, the resulted value will be displayed against Tax field and the same amount need to be updated into the table against...
0
3237
by: Access Programming only with macros, no code | last post by:
ERROR MESSAGE: Could not update; currently locked by another session on this machine. BACKGROUND I have the following objects: Table1 - HO (which has about 51,000+ records) Table2 - Contact (which has 68,000+ records)
6
5857
by: KevinPreston | last post by:
Hello everyone, this is my first post so apologies if i dont get it right first time, i am a self taught Access user, i am stuck on something i am trying to do, briefly i have 2 tables, one for vehicle details and one for inspection details of vehicles in the first table. I have 2 fields that are the same in both tables, lastsafe and distance, the vehicles table can only have 1 vehicle to each record, the inspection table can have multiple...
4
2407
by: dougmeece | last post by:
Morning Everyone... I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date Submitted defaults to 1/1/00 if the cboSubmittedBox field is "No". Otherwise it is selected from a calendar. The Date Entered field defaults to the current date. There are 3 sets of criteria that need to be checked for the update or append to take place. ...
9
3862
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 field. Based on the selection of the first form field, I would like the default value of the...
1
1870
beacon
by: beacon | last post by:
Hi everybody, I have an Employee table with the following: Table - Employee -------------------------- ID: AutoNum, PK FName: Text LName: Text Status: Yes/No
0
9522
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9336
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9948
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6603
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
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
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.