#Name? Access 2010

gowans07

Registered User.
Local time
Today, 14:21
Joined
Sep 27, 2011
Messages
36
Hey,

I currently have a form with a subform in, used for a simple order proccessing system. The subform contains details about products. When i first open the form details are displayed correctly in the subform, when i click a button which will allow me to add another product to the order i get the following errors in the subform: #Name?


Any suggestions?
Can provide more info if needed
 
What is your code on your button?

Code:
d.O

Its just weird that it works the first time and not afterwards. I had this working a few months back too.
 
Last edited:
Are your queries that you are opening Append, Update, or Delete queries?

Just an FYI, while I look at your code. Use code tags when posting code, especially large bits of it.

See here how to do it:
codetag001.png
 
Just an FYI, while I look at your code. Use code tags when posting code, especially large bits of it. Also, are your queries that you are opening Append, Update, or Delete queries?

See here how to do it:
codetag001.png

Yeh sorry about that, the ones ending _RecordSave are both Append queries.
 
What about the one TemporaryDetails? What is that supposed to accomplish?

Also, to start with, when referring to controls in code, you should use the ME keyword to let Access know for sure what you are referring to (control on the current form). Sometimes it has a problem if you don't do that. So like:

If Me.CmbCustomer.Enabled = True Then
 
That is also another Append Query, it moves values to a temp table for proccessing at a later stage. Changed all to Me."controlname" still same prpblem.
 
I just re-read your initial post. Do any of your subform fields depend on something in the main form for their value? Also, setting a control's value to "" is not the same as setting it equal to NULL.
 
Yes, the subform is requered upon TxtProductRef being updated. So the query ran referecences Forms!Frm_Order.TxtProductRef
 
Yes, the subform is requered upon TxtProductRef being updated. So the query ran referecences Forms!Frm_Order.TxtProductRef

That is most likely the cause because you are using

TxtProductRef.value = ""

which is not a valid reference for the subform.
 
Perfect Solved!!! Change a line in a different event for the form to = Null and voila it works! Thanks for your help and speedy responses Bob!
 

Users who are viewing this thread

Back
Top Bottom