473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 4323
"Mike" <mb********@charter.net> wrote in message
news:70*************************@posting.google.co m...
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("Description","MonModDesc","Model = " & [Model])

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

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

"Brian" <bc**@IHATESPAMclara.co.uk> wrote in message news:<10****************@echo.uk.clara.net>...
"Mike" <mb********@charter.net> wrote in message
news:70*************************@posting.google.co m...
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("Description","MonModDesc","Model = " & [Model])

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

= Dlookup("Description","MonModDesc","Model = """ & [Model] & """")

Nov 13 '05 #3

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

Similar topics

3
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...
2
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...
16
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...
4
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...
0
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 -...
6
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...
4
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...
9
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...
1
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.