Error keeps poping up after expression is deleted (1 Viewer)

connerlowen

Registered User.
Local time
Today, 18:33
Joined
May 18, 2015
Messages
204
HI,

This error message keeps popping up no matter what I do. "Database can't find the field 'QuotationNumber' referred to in your expression." I tried to define a text box by using a DLookUp function, however that did not work. I deleted the function, and now this error message keeps popping up. I have searched everywhere for an expression with 'QuotationNumber' in it, and I cannot find it. What do I do?

Thanks,

Conner
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:33
Joined
Aug 30, 2003
Messages
36,137
It's either referred to in a textbox, perhaps in the Order By property, or perhaps code. If the form is based on a query it could be there too. If you can't find it, can you post the db here?
 

connerlowen

Registered User.
Local time
Today, 18:33
Joined
May 18, 2015
Messages
204
The form that it keeps popping up on has a textbox for the 'QuotationNumber'. There is code behind this form to generate the number format "yyyymmdd-01' for the first quotation and '-02' for the second and so on. The other field on the form is a combobox that has a list of all customers in it. Once a customer is selected the 'QuotationNumber' is generated. This is all working fine. The error message pops up when I click on a button 'Add Part' that opens a new form and closes the first form. I noticed that the first form does not close until the error message is closed.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:33
Joined
Aug 30, 2003
Messages
36,137
It sounds like it may be the second form looking for it. If not, what's the code behind the button?
 

connerlowen

Registered User.
Local time
Today, 18:33
Joined
May 18, 2015
Messages
204
I figured it out. I was as simple as the order that the macros were in. there is one macro to close the current form, and another to open the next form.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:33
Joined
Aug 30, 2003
Messages
36,137
Glad you got it sorted out.
 

connerlowen

Registered User.
Local time
Today, 18:33
Joined
May 18, 2015
Messages
204
Now, My other question remains. What do I need to change about my DLookUp statement?
 

Users who are viewing this thread

Top Bottom