Question : #Name? Error Access Unbound Text Boxes

This is really annoying.
I have a database that has been working extremely well.I changed a few of the formulas to update the data, not changing the record source at all. All of the items in the equation are in the original record source. On start it opens an form with an overview of the data.  You double click text box(the name of an individual) in the form to open up a specific form on that individual. Now when it opens the form with the specifc information after you double click the text box about 20 of them have "#Name?" in the unbound text box. At first glance it appears that every text box that has this error starts with an = sign and is an equation of some kind.  I searched this on Google and found the following response on another website. That said I dont quite understand how to use the information below

[[[[[[ My problem did not exist with my unbound text box source controls. The problem was my loading and unloading of forms. I have two forms, both tied to tables. One form opens up first and when the user clicks a button to exit the other pops up. My code was not loading the second form correctly (the form that I was pulling the data for my report) and thus caused the #Name? error to display.

The correct code for me to use when my second form loaded was :
DoCmd.OpenForm "frmInputForm", acNormal
Placed under the Private Sub Form_Unload section of the first form. I was not using that code and my second form was not loading correctly. I could add, edit, and delete records but for some reason I could not run query's that were dependent on the data on the form or create unbound text boxes]]]]]]]]]]


With this in mind I have attached the VB that I us to open the new form. Please keep in mind that I am still a newbie.

I really appreciate your help. I need to roll this database out on Friday so thank you in advance for being life savers.


rivate Sub AgtFullName_DblClick(Cancel As Integer)
    'Hope to open FsaDataYtd based on Agent Click
    DoCmd.OpenForm "FsaDataYtd", , , "AgtFullName = '" & Me!AgtFullName & "'"
    'DoCmd.OpenForm "FsaDataYtd", , , "Agent = " & Chr(34) & Me!Agent & Chr(34)
End Sub
Code Snippet:
1:
2:
3:
4:
5:
rivate Sub AgtFullName_DblClick(Cancel As Integer)
    'Hope to open FsaDataYtd based on Agent Click
    DoCmd.OpenForm "FsaDataYtd", , , "AgtFullName = '" & Me!AgtFullName & "'"
    'DoCmd.OpenForm "FsaDataYtd", , , "Agent = " & Chr(34) & Me!Agent & Chr(34)
End Sub

Answer : #Name? Error Access Unbound Text Boxes

try this
1:
2:
3:
4:
5:
change this
DoCmd.OpenForm "FsaDataYtd", , , "AgtFullName = '" & Me!AgtFullName & "'" 
to
DoCmd.OpenForm "FsaDataYtd", , , "[AgtFullName] = '" & Me.AgtFullName & "'"
Random Solutions  
 
programming4us programming4us