473,466 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Linking columns

14 New Member
Is it possible to update the text in tblSIGNS column Open_Work_Order to say yes if tblHISTORY Column Urgency is High, Medium, or Low for the same Sign id that is in both tables(tblhistory column name is SIGN_ID and tblSigns column name is SIGNID) and tblSIGNS column Open_Work_Order to say no when tblHISTORY Column Urgency says Completed. In my form that is bound to tblSIGNS I have a text box that is bound to Open_Work_Order.
Dec 10 '15 #1

✓ answered by zmbd

Ok,
You have ran your question into a really jumbled mess...

+ Nomenclature, I understand that the tables look like worksheets; however, in Access:
++ data tables have records - not rows
++ Records have fields - not columns.
Using the proper terms helps to keep your question clear.

Next:
Table named: [tblSigns]
Field named: [Open_Work_Order]
Field named: [SIGNID]

Table named: [tblHISTORY]
Field named: [Urgency]
Field named: [SIGN_ID]

You want:
[tblSigns]![Open_Work_Order]="yes"
when
[tblHISTORY]![Urgency]={"High","Medium","Low"}

You really do not need to store the Yes/No in [tblSigns]![Open_Work_Order] instead in your query wherein [tblHISTORY]![Urgency] is present, in a calculated field:
Expand|Select|Wrap|Line Numbers
  1. Expr1: IIF((([tblHISTORY]![Urgency]="High") OR ([tblHISTORY]![Urgency]="Medium") OR ([tblHISTORY]![Urgency]="Low")), "Yes", "No")
Change Expr1: to whatever you want the field name to be.
Bind your text control to the calculated field.

Next, I would pull your text "high"...
into a table (normalization) and using only a foreign key reference... from that table... and test against, 1, 2, 3 (say 1 == high, etc..) this way the user cannot mistype the values.

5 1294
zmbd
5,501 Recognized Expert Moderator Expert
Ok,
You have ran your question into a really jumbled mess...

+ Nomenclature, I understand that the tables look like worksheets; however, in Access:
++ data tables have records - not rows
++ Records have fields - not columns.
Using the proper terms helps to keep your question clear.

Next:
Table named: [tblSigns]
Field named: [Open_Work_Order]
Field named: [SIGNID]

Table named: [tblHISTORY]
Field named: [Urgency]
Field named: [SIGN_ID]

You want:
[tblSigns]![Open_Work_Order]="yes"
when
[tblHISTORY]![Urgency]={"High","Medium","Low"}

You really do not need to store the Yes/No in [tblSigns]![Open_Work_Order] instead in your query wherein [tblHISTORY]![Urgency] is present, in a calculated field:
Expand|Select|Wrap|Line Numbers
  1. Expr1: IIF((([tblHISTORY]![Urgency]="High") OR ([tblHISTORY]![Urgency]="Medium") OR ([tblHISTORY]![Urgency]="Low")), "Yes", "No")
Change Expr1: to whatever you want the field name to be.
Bind your text control to the calculated field.

Next, I would pull your text "high"...
into a table (normalization) and using only a foreign key reference... from that table... and test against, 1, 2, 3 (say 1 == high, etc..) this way the user cannot mistype the values.
Dec 10 '15 #2
edunker
14 New Member
What do you mean by bind your text control to the calculated field?
Dec 11 '15 #3
mbizup
80 New Member
Hmm - you're posting these questions both here and on MSDN.

In the interest of general forum etiquette, please don't do that. That tends to turn your solutions into a 'jumbled mess' too (and tends to create extra work for those assisting you), with multiple people helping you out without necessarily knowing what help has already been provided elsewhere.
Dec 11 '15 #4
edunker
14 New Member
mbizup, that is exactly what i am looking for. more then one way of getting things done.
Dec 11 '15 #5
zmbd
5,501 Recognized Expert Moderator Expert
+ Bound control is one where the Control Source property of the control is set to a field within a record source such as a stored query or table. You will see this in the control on the form in design view, it will say - [field name] << such as [User_ID] >>

+ UnBound control is one where the Control Source property of the control is Null/Empty. You will see this in the control on the form in design view, it will say - "unbound"

+ Calculated control is one where the Control Source property of the control is to an equation involving the record source or a user-defined-function (UDF). You will see this in the control on the form in design view, it will say for example [=UDF([fieldname])] or [=iif([fieldname],true,false)]

>> Yes, cross-posting isn't considered to be the best form. We do understand the desire to get help quickly in urgent situations; however, quite often, the same experts are working in multiple forums so you really do not gain a whole lot in that aspect - at one point I had a few active accounts on various sites, I've really since dropped them as most of the time the answer shows up here :) - the membership may vary a bit. :)
Dec 11 '15 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: JAdrianB | last post by:
I'm trying to use a datagrid for data entry. I've created a couple of combo box columns using information from http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q480q That example basically sets...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
6
by: davegb | last post by:
I've searched here and in the help screens, but I can't find the answer to a very simple question. How do I create a specific link between 2 records in 2 different tables? I know how to use the...
2
by: Will | last post by:
I have a table, tblManinstructions with fields Code & InstructionID, one Code can have many InstructionID. I also have tblinstructions (fields instructionID & instruction). What I want to do is...
1
by: Gt394 | last post by:
tbl_Quote PK QuoteNo tbl_QuoteDetails - Junction table between tbl_Quote and tbl_Product tbl_Product PK ProductID tbl_Thickness PK ThicknessID tbl_PanelType PK PanelID...
2
by: Simon Verona | last post by:
I have a combobox that is contained within a user control. Whilst the application is running, I'm attaching the combobox to a new dataset. The problem I'm getting is that the combobox doesn't...
6
by: oyk | last post by:
I hope someone could help me on this. I have linked an excel worksheet to access but the some data shown in the access table has the #Num errors. Presumably, this must be because the data in the...
12
by: cj | last post by:
When viewing a datatable in a datagridview one of the columns in it is a "note" field which can be quite long. I would like to have the note field of the currently selected row of the datagrid...
3
by: mansi sharma | last post by:
--Que-5) Select CTM_NBR,LIST_CODE,ADR_CDE,ADR_FLAG --From table A,B,C,D by linking the tables where --the LIST_CODE=18. TABLE A Has Column CTM_NBR ...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.