Subform question

  • Thread starter Thread starter EMILYTAN via AccessMonster.com
  • Start date Start date
E

EMILYTAN via AccessMonster.com

1. Well, I am loading data from ms excel to ms access. Then, I am using
subform to view the data.
Then, I want to show the data that has error in yellow color backcolor..
Of course there is the main and the subform is the attaching form in it...
Any idea?

2. This question is not related to question 1

Code:
txtW_QtyPending = Val(txtW_KittedQty) - Val(txtW_RequiredQty)


I want to calculate with a bound control source under txtW_QtyPending. I use
subform to view the data. However, it can show me the result for the first
record....
Hpw can I make it to show all the entire record?
 
Emily,

Have you tried conditional formatting in the subform?
Try the following:

Choose th dropdown for the first condition. Set this to "Expression Is" and
type in the textbox next to the combo IsError([yourfieldname]) and set the
backcolor to yellow.

Replace the yourfieldname with the name of the field you want to display a
yellow background. This should do the trick. If you have multiple fields you
should set them accordingly.

For the second question

Is your subform a continuous form or a single form. When it is a single form
you should get a calculation for one record. If it is a continuous form you
could place sum in front of it

hth
 
1. My expression is this

DLookUp("WIPType","Inventory","PartNumber='" & "txtPartNumber" & "'")
How am I suppose to put in the conditional formating?

2. I am using single form. However, can only get it calculated for the first
record.

My formula is :
txtW_QtyPending = txtW_KittedQty-txtW_RequiredQty
All of these are bound to table.
Thank you
Emily,

Have you tried conditional formatting in the subform?
Try the following:

Choose th dropdown for the first condition. Set this to "Expression Is" and
type in the textbox next to the combo IsError([yourfieldname]) and set the
backcolor to yellow.

Replace the yourfieldname with the name of the field you want to display a
yellow background. This should do the trick. If you have multiple fields you
should set them accordingly.

For the second question

Is your subform a continuous form or a single form. When it is a single form
you should get a calculation for one record. If it is a continuous form you
could place sum in front of it

hth
1. Well, I am loading data from ms excel to ms access. Then, I am using
subform to view the data.
[quoted text clipped - 11 lines]
record....
Hpw can I make it to show all the entire record?
 
DLookUp("WIPType","Inventory","PartNumber='" & "txtPartNumber" & "'")
In this statement, I presume txtPartNumber is a control on yr subform,
right?
If so, leave out the double quotes when pointing to this control, as in

DLookUp("WIPType","Inventory","PartNumber='" & txtPartNumber & "'")

As to yr calculation question:
create a form footer on your subform, and use the following code (or
similar)
in the controlsource property of that control
(note: "txtW_KittedQty" and "txtW_RequiredQty" need to be controls in the
detail section of yr subform)

txtW_QtyPending = Sum(txtW_KittedQty)-Sum(txtW_RequiredQty)
Whereby, "txtW_QtyPending" is a control in the formfooter section of yr
form.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE



EMILYTAN via AccessMonster.com said:
1. My expression is this

DLookUp("WIPType","Inventory","PartNumber='" & "txtPartNumber" & "'")
How am I suppose to put in the conditional formating?

2. I am using single form. However, can only get it calculated for the
first
record.

My formula is :
txtW_QtyPending = txtW_KittedQty-txtW_RequiredQty
All of these are bound to table.
Thank you
Emily,

Have you tried conditional formatting in the subform?
Try the following:

Choose th dropdown for the first condition. Set this to "Expression Is"
and
type in the textbox next to the combo IsError([yourfieldname]) and set the
backcolor to yellow.

Replace the yourfieldname with the name of the field you want to display a
yellow background. This should do the trick. If you have multiple fields
you
should set them accordingly.

For the second question

Is your subform a continuous form or a single form. When it is a single
form
you should get a calculation for one record. If it is a continuous form
you
could place sum in front of it

hth
1. Well, I am loading data from ms excel to ms access. Then, I am using
subform to view the data.
[quoted text clipped - 11 lines]
record....
Hpw can I make it to show all the entire record?
 
Emily,

Your expression should read "IsError([Your fieldname here]" So literaly typ
this in but replace the yourfieldname with your field. The expression you use
gives you the data in your field right? This is checked by the conditional
formatting. If it 'sees' #Error it will make the backcolor your color. You
should place this in your conditional formatting.

The fact that you are using a single form says it all. You'll only get one
result because that's what's displayed. If you want a total you should create
a query and make the sum in there. Then reference the output of the query to
the textbox.

hth
--
Maurice Ausum


EMILYTAN via AccessMonster.com said:
1. My expression is this

DLookUp("WIPType","Inventory","PartNumber='" & "txtPartNumber" & "'")
How am I suppose to put in the conditional formating?

2. I am using single form. However, can only get it calculated for the first
record.

My formula is :
txtW_QtyPending = txtW_KittedQty-txtW_RequiredQty
All of these are bound to table.
Thank you
Emily,

Have you tried conditional formatting in the subform?
Try the following:

Choose th dropdown for the first condition. Set this to "Expression Is" and
type in the textbox next to the combo IsError([yourfieldname]) and set the
backcolor to yellow.

Replace the yourfieldname with the name of the field you want to display a
yellow background. This should do the trick. If you have multiple fields you
should set them accordingly.

For the second question

Is your subform a continuous form or a single form. When it is a single form
you should get a calculation for one record. If it is a continuous form you
could place sum in front of it

hth
1. Well, I am loading data from ms excel to ms access. Then, I am using
subform to view the data.
[quoted text clipped - 11 lines]
record....
Hpw can I make it to show all the entire record?
 
Back
Top