My Assistant
![]() ![]() |
|
|
Apr 11 2012, 10:29 AM
Post
#1
|
|
|
UtterAccess Member Posts: 25 |
I have a simple form to record defects on our material both at the beginning of the run and at the end. Let's call them DefectHeadCode and DefectTailCode. Our list of defects is long so I created a separate table for simplicity and maintainability. The Defects table just has the fields DefectCode and DefectDescription. I can't seem to get the Description to be specific on the form for both Head and Tail. I can't add the control to the form for both.
I have been successful at building code behind non-bound controls that does SQL calls for each, but I was wondering if there was anything more elegant using the native workings of Access. Thank you for your time. ---eric |
|
|
|
Apr 11 2012, 10:37 AM
Post
#2
|
|
|
UtterAccess Guru Posts: 731 From: North of the 49th Parallel |
eric,
I'm not entirely sure I understand how you've set this up - but a thought occurs, are you explicitly stating which table each description is calling from? ie: [table1].[DefectDescription] & [table2].[DefectDescription] |
|
|
|
Apr 11 2012, 10:42 AM
Post
#3
|
|
|
UtterAccess Veteran Posts: 303 From: Edmonton, Alberta, Canada |
Can you post a snapshot of the form?
|
|
|
|
Apr 11 2012, 10:42 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 7,394 From: Oadby Leics, UK |
"Let's call them DefectHeadCode and DefectTailCode"
To see both you need two fields in your table, one for each. Or else you use an unbound control for the Headcode and place the starting value into the control using code in the form current event. |
|
|
|
Apr 12 2012, 09:55 AM
Post
#5
|
|
|
UtterAccess Member Posts: 25 |
I am not exactly sure how to upload things so I took a couple of screen shots. The "-entrylog" file shows the form. This form works because the Head and Tail Cut Defect Descriptions are unbound and I get the values in the background.
I am just wondering if there is a way to use the native functionality of Access to more elegantly and easily bring up the descriptions for both head and tail defects when two fields on the entry log table are pointing to the same external table |
|
|
|
Apr 12 2012, 10:01 AM
Post
#6
|
|
|
UtterAccess Guru Posts: 731 From: North of the 49th Parallel |
Deleted.
This post has been edited by Squire4Hire: Apr 12 2012, 10:01 AM |
|
|
|
Apr 12 2012, 10:13 AM
Post
#7
|
|
|
UtterAccess Veteran Posts: 303 From: Edmonton, Alberta, Canada |
In your combo boxes, just make sure to include the "DefectDesc" field in the column next to the "DefectCd" field in your rowsource query. You don't have to make the "DefectDesc" column visible in your combo box, but then in the textbox next to the combo box you can reference the DefectDesc column by entering "=cboDefectHead.column(1)" with column(0) being the DefectCd.
Hope this makes sense. |
|
|
|
Apr 12 2012, 04:49 PM
Post
#8
|
|
|
UtterAccess Member Posts: 25 |
HA!!!
That was perfect. I am learning new cool stuff every day. A much more elegant solution than my "bull in a china shop" sql call. Thank you so much! ---eric |
|
|
|
Apr 12 2012, 04:50 PM
Post
#9
|
|
|
UtterAccess Member Posts: 25 |
HA!!!
That was perfect. I am learning new cool stuff every day. A much more elegant solution than my "bull in a china shop" sql call. Thank you so much! ---eric |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 04:07 PM |