Text Box #error

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]))
 
J

John W. Vinson

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.
 
B

Bob Vance

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
 
J

John W. Vinson

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.
 
G

Gina Whipp

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
 
B

Bob Vance

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
 
B

Bob Vance

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
 
G

Gina Whipp

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
 

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

Similar Threads


Top