TextBox Question!

B

Bob

Can I get a text box to show"Overdue Amount " when this text
box(tbOverDueAmount) shows anthing more than zero


Thanks in advance.........Bob Vance




Thanks in advance.........Bob Vance
 
D

Dirk Goldgar

Bob said:
Can I get a text box to show"Overdue Amount " when this text
box(tbOverDueAmount) shows anthing more than zero

You mean you want some other text box to show the words "Overdue Amount"
if tbOverDueAmount is more than zero? YOu could give the text box a
controlsource expression of

=IIf([tbOverDueAmount > 0], "Overdue Amount", Null)
 
B

Bob

Dirk where do I put this script? Thanks Bob

Dirk Goldgar said:
Bob said:
Can I get a text box to show"Overdue Amount " when this text
box(tbOverDueAmount) shows anthing more than zero

You mean you want some other text box to show the words "Overdue Amount"
if tbOverDueAmount is more than zero? YOu could give the text box a
controlsource expression of

=IIf([tbOverDueAmount > 0], "Overdue Amount", Null)

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
B

Bob

I did put this in Control Source Window and got a #Name? Error....Thanx Bob

Bob said:
Dirk where do I put this script? Thanks Bob

Dirk Goldgar said:
Bob said:
Can I get a text box to show"Overdue Amount " when this text
box(tbOverDueAmount) shows anthing more than zero

You mean you want some other text box to show the words "Overdue Amount"
if tbOverDueAmount is more than zero? YOu could give the text box a
controlsource expression of

=IIf([tbOverDueAmount > 0], "Overdue Amount", Null)

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
D

Dirk Goldgar

Bob said:
Dirk where do I put this script? Thanks Bob

Dirk Goldgar said:
Bob said:
Can I get a text box to show"Overdue Amount " when this text
box(tbOverDueAmount) shows anthing more than zero

You mean you want some other text box to show the words "Overdue
Amount" if tbOverDueAmount is more than zero? YOu could give the
text box a controlsource expression of

=IIf([tbOverDueAmount > 0], "Overdue Amount", Null)

With the form open in design view, add the text box to be used for this
(if you haven't already). It will not be bound to any field. Then open
the property sheet for the text box, go to the Data tab, and enter the
expression (including the leading "=" sign) on the line that says
Control Source.
 
B

Bob

Oops still getting #Name? Maybe is it something to do what is in the other
Text box tbOverDueAmount
=NZ(DSum("OwnerPercentAmount","tblInvoice","OwnerID =" & tbOwnerID.Value & "
and InvoiceDate <" &
Format("Forms!frmBillStatement![tbDateFrom]","mm/dd/yyyy")),0)-NZ(DSum("PaidAmount","tblAccountStatus","OwnerID
=" & tbOwnerID.Value & " and BillDate <" &
Format("Forms!frmBillStatement![tbDateFrom]","mm/dd/yyyy")),0)

Thanks Bob

Dirk Goldgar said:
Bob said:
Dirk where do I put this script? Thanks Bob

Dirk Goldgar said:
Can I get a text box to show"Overdue Amount " when this text
box(tbOverDueAmount) shows anthing more than zero

You mean you want some other text box to show the words "Overdue
Amount" if tbOverDueAmount is more than zero? YOu could give the
text box a controlsource expression of

=IIf([tbOverDueAmount > 0], "Overdue Amount", Null)

With the form open in design view, add the text box to be used for this
(if you haven't already). It will not be bound to any field. Then open
the property sheet for the text box, go to the Data tab, and enter the
expression (including the leading "=" sign) on the line that says
Control Source.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
B

Bob

Sorry this is on a Report!!!
Bob

Dirk Goldgar said:
Bob said:
Dirk where do I put this script? Thanks Bob

Dirk Goldgar said:
Can I get a text box to show"Overdue Amount " when this text
box(tbOverDueAmount) shows anthing more than zero

You mean you want some other text box to show the words "Overdue
Amount" if tbOverDueAmount is more than zero? YOu could give the
text box a controlsource expression of

=IIf([tbOverDueAmount > 0], "Overdue Amount", Null)

With the form open in design view, add the text box to be used for this
(if you haven't already). It will not be bound to any field. Then open
the property sheet for the text box, go to the Data tab, and enter the
expression (including the leading "=" sign) on the line that says
Control Source.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
D

Dirk Goldgar

Bob said:
Oops still getting #Name? Maybe is it something to do what is in the
other Text box tbOverDueAmount
=NZ(DSum("OwnerPercentAmount","tblInvoice","OwnerID =" &
tbOwnerID.Value & " and InvoiceDate <" &
Format("Forms!frmBillStatement![tbDateFrom]","mm/dd/yyyy")),0)-NZ(DSum("
PaidAmount","tblAccountStatus","OwnerID
=" & tbOwnerID.Value & " and BillDate <" &
Format("Forms!frmBillStatement![tbDateFrom]","mm/dd/yyyy")),0)

Argh! I typed it wrong. <sigh> I'm having a bad week. Here's what
you should put in the Control Source:

=IIf([tbOverDueAmount] > 0, "Overdue Amount", Null)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top