Text Box #error

  • Thread starter Thread starter Bob Vance
  • Start date Start date
B

Bob Vance

My text box works fine untill I open a new form and there is no data in
[OwnerID] I get a "#error" in my text box,
Control Source below!
=nz(DLookUp("[Payable]","[qryOverdueAll]","[OwnerID] = " & [OwnerID]))
 
My text box works fine untill I open a new form and there is no data in
[OwnerID] I get a "#error" in my text box,
Control Source below!
=nz(DLookUp("[Payable]","[qryOverdueAll]","[OwnerID] = " & [OwnerID]))

Try:

=DLookUp("[Payable]", "qryOverdueAll", "[OwnerID] = " & NZ([OwnerID]))

This will look up the (presumably nonexistant) owner number zero if the form
or the OwnerID field is empty.
 
John W. Vinson said:
My text box works fine untill I open a new form and there is no data in
[OwnerID] I get a "#error" in my text box,
Control Source below!
=nz(DLookUp("[Payable]","[qryOverdueAll]","[OwnerID] = " & [OwnerID]))

Try:

=DLookUp("[Payable]", "qryOverdueAll", "[OwnerID] = " & NZ([OwnerID]))

This will look up the (presumably nonexistant) owner number zero if the
form
or the OwnerID field is empty.
Thanks John, that did not work so will set font to fffff and condition the
text box for black more than 0 and less than 0
I have a funny bug in my db ,if i stripp it down a little bit and compress
it do you think you could look at this problem
it in happening in what i have called "Holding Invoices"
Regards Bob
 
John W. Vinson said:
My text box works fine untill I open a new form and there is no data in
[OwnerID] I get a "#error" in my text box,
Control Source below!
=nz(DLookUp("[Payable]","[qryOverdueAll]","[OwnerID] = " & [OwnerID]))

Try:

=DLookUp("[Payable]", "qryOverdueAll", "[OwnerID] = " & NZ([OwnerID]))

This will look up the (presumably nonexistant) owner number zero if the
form
or the OwnerID field is empty.
Thanks John, that did not work so will set font to fffff and condition the
text box for black more than 0 and less than 0
I have a funny bug in my db ,if i stripp it down a little bit and compress
it do you think you could look at this problem
it in happening in what i have called "Holding Invoices"
Regards Bob

Sorry, I'm really busy with paying work right now; don't have time to work on
a database for free.
 
Bob,

Try something like...

=IIf(Not IsNull([OwnerID]),DLookUp("[Payable]","[qryOverdueAll]","[OwnerID]
= " & [OwnerID])," ")

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm


John W. Vinson said:
My text box works fine untill I open a new form and there is no data in
[OwnerID] I get a "#error" in my text box,
Control Source below!
=nz(DLookUp("[Payable]","[qryOverdueAll]","[OwnerID] = " & [OwnerID]))

Try:

=DLookUp("[Payable]", "qryOverdueAll", "[OwnerID] = " & NZ([OwnerID]))

This will look up the (presumably nonexistant) owner number zero if the
form
or the OwnerID field is empty.
Thanks John, that did not work so will set font to fffff and condition the
text box for black more than 0 and less than 0
I have a funny bug in my db ,if i stripp it down a little bit and compress
it do you think you could look at this problem
it in happening in what i have called "Holding Invoices"
Regards Bob
 
Sorry, I'm really busy with paying work right now; don't have time to work
on
a database for free.
Thanks John found the error has duplicates ID numbers in my table, so set it
to primary key and all is fine now
Regards Bob
 
Thanks Gina, worked perfect :)
Regards Bob

Gina Whipp said:
Bob,

Try something like...

=IIf(Not
IsNull([OwnerID]),DLookUp("[Payable]","[qryOverdueAll]","[OwnerID]
= " & [OwnerID])," ")

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm


John W. Vinson said:
My text box works fine untill I open a new form and there is no data in
[OwnerID] I get a "#error" in my text box,
Control Source below!
=nz(DLookUp("[Payable]","[qryOverdueAll]","[OwnerID] = " & [OwnerID]))

Try:

=DLookUp("[Payable]", "qryOverdueAll", "[OwnerID] = " & NZ([OwnerID]))

This will look up the (presumably nonexistant) owner number zero if the
form
or the OwnerID field is empty.
Thanks John, that did not work so will set font to fffff and condition the
text box for black more than 0 and less than 0
I have a funny bug in my db ,if i stripp it down a little bit and compress
it do you think you could look at this problem
it in happening in what i have called "Holding Invoices"
Regards Bob
 
You're welcome!

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Thanks Gina, worked perfect :)
Regards Bob

Gina Whipp said:
Bob,

Try something like...

=IIf(Not
IsNull([OwnerID]),DLookUp("[Payable]","[qryOverdueAll]","[OwnerID]
= " & [OwnerID])," ")

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm


John W. Vinson said:
My text box works fine untill I open a new form and there is no data in
[OwnerID] I get a "#error" in my text box,
Control Source below!
=nz(DLookUp("[Payable]","[qryOverdueAll]","[OwnerID] = " & [OwnerID]))

Try:

=DLookUp("[Payable]", "qryOverdueAll", "[OwnerID] = " & NZ([OwnerID]))

This will look up the (presumably nonexistant) owner number zero if the
form
or the OwnerID field is empty.
Thanks John, that did not work so will set font to fffff and condition the
text box for black more than 0 and less than 0
I have a funny bug in my db ,if i stripp it down a little bit and compress
it do you think you could look at this problem
it in happening in what i have called "Holding Invoices"
Regards Bob
 
Back
Top