Results 1 to 10 of 10
  1. #1
    lbcarvalho is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2018
    Posts
    31

    I always have trouble using a specif field from one table in other objects. What's wrong?

    Click image for larger version. 

Name:	PICTURE_TO_FORUM.PNG 
Views:	17 
Size:	12.7 KB 
ID:	41266



    I have the two tables above, CLIENTES (CLIENTS) and TRABALHOS (=JOBS) among others, but almost every time I want to use the field called MOEDA (=CURRENCY) I get error messages like #Name?

    Maybe I'm doing something wrong, but I am not sure what.

    Do I have to always create a query or do something else besides the regular association procedure to link the field MOEDA (=CURRENCY) to other objects like reports and forms?

    Thanks in advance for any tip that may lead to the solution of this annoying problem!

    lbcarvalho

  2. #2
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    273
    Normally not, if you place an example file you could check what you say.

  3. #3
    lbcarvalho is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2018
    Posts
    31
    Let m try to make it clearer:

    I built a subform that uses almost all of the fields in table TRABALHOS (=JOBS) and I want only one field (MOEDA (= CURRENCY)) from the other table, CLIENTES (=CLIENTS) and then I get the above mentioned error (#Name?).

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    What is the subform's recordsource? Is it a query similar to the one you show in the first post?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Could be because "Currency" is a reserved word in Access (Jet) and shouldn't be used for object names.

    Try changing it to something like "CurrencyType" - anything except Currency.

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    Ignore this post, see next.

  7. #7
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    Have you tried =Parent.[Moeda] for the control on the subform?

  8. #8
    lbcarvalho is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2018
    Posts
    31
    Thank you very much, ssanfu! Apparently you are right. I mean, the word MOEDA is really a reserved word in Brazilian Portuguese (I am in Brazil) as well as CURRENCY. I changed its name to VarMOEDA and it seems to have become easier now to find the variable.

    I have been using the Field List to try to find the MOEDA (now VarMOEDA) field and it seems it got more simple now.

    I'll post more info here as soon as I understand the process better.

    Quote Originally Posted by ssanfu View Post
    Could be because "Currency" is a reserved word in Access (Jet) and shouldn't be used for object names.

    Try changing it to something like "CurrencyType" - anything except Currency.

  9. #9
    lbcarvalho is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2018
    Posts
    31
    Thank you very much, davegri! Yes, I have tried =[CLIENTE]![MOEDA]. I guess that's what you are talking about, right?
    Apparently it did not work, or, maybe, I have not made the correct adjustments. Not 100% sure.
    So far, the use of a reserved word (MOEDA) seems to have caused all the issues.
    I'll be testing my system and will let you guys know when I am more certain of what is going on.
    Best regards!


    Quote Originally Posted by davegri View Post
    Have you tried =Parent.[Moeda] for the control on the subform?

  10. #10
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    Yes, I have tried =[CLIENTE]![MOEDA]. I guess that's what you are talking about, right?
    No, I meant exactly =Parent.[Moeda] as the control source for a textbox on the subform.

    Edit:
    In light of Post#8 the control source would be =Parent.[VarMoeda]
    Last edited by davegri; 03-12-2020 at 12:06 PM. Reason: Edit

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Imported data shifting to the wrong field
    By Cooperx5 in forum Import/Export Data
    Replies: 2
    Last Post: 03-28-2016, 02:33 PM
  2. Text field wrong value
    By xcheshirecat in forum Forms
    Replies: 13
    Last Post: 06-14-2014, 10:14 AM
  3. Report ascending wrong field
    By Ruegen in forum Reports
    Replies: 3
    Last Post: 11-10-2013, 08:10 PM
  4. Replies: 4
    Last Post: 08-12-2013, 11:00 AM
  5. Updating field goes to wrong record
    By chrismalan in forum Forms
    Replies: 7
    Last Post: 03-20-2011, 08:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums