Results 1 to 5 of 5
  1. #1
    gpeirce is offline Novice
    Windows 8 Access 2007
    Join Date
    Oct 2015
    Location
    Oregon, USA
    Posts
    13

    Showing VBA variables on the form

    I'm an experienced SQL programmer but only a beginner in Access.



    I posted before but things got too confusing. I have some variables coded in a VBA module. The results are in fields called intA, intB and intC.


    I also have 3 texts boxes on a form. How do I code the text boxes so I can display intA, intB and intC? Do I put something in the control source? Do I name the box in a certain way? Do I put some code in like me.intA.value = something or other??

    An accdb example would be nice too, if you have it.

    Thank you so much for your time.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I am confused. The fields are intA, intB, intC or are these the VBA variables?

    VBA to set values of textboxes from variables would be like:

    Me.textboxname = variablename


    What do you mean by an 'accdb example' - an accdb is Access database file extension.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    gpeirce,

    I realize you are new to Access and related forums. However, in any forum, when you cross post - that is post the same question on multiple forums, it is considered proper etiquette/netiquette to inform readers that you have done so. It isn't wrong to cross post, but it is "poor behavior" to not tell readers you have done so.

    Here is why.

  4. #4
    gpeirce is offline Novice
    Windows 8 Access 2007
    Join Date
    Oct 2015
    Location
    Oregon, USA
    Posts
    13
    Exactly what I needed! Thank you.

  5. #5
    gpeirce is offline Novice
    Windows 8 Access 2007
    Join Date
    Oct 2015
    Location
    Oregon, USA
    Posts
    13
    Thank you, orange. I sure did not know that. Will do next time.

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

Similar Threads

  1. Replies: 8
    Last Post: 10-08-2014, 06:08 PM
  2. Using Variables to Refer to Form Objects
    By BallinWallin in forum Programming
    Replies: 3
    Last Post: 07-19-2014, 09:46 PM
  3. Replies: 6
    Last Post: 04-02-2014, 11:35 AM
  4. Create a form with variables and constants
    By smcnair_wtc in forum Forms
    Replies: 2
    Last Post: 01-08-2013, 10:54 PM
  5. Replies: 5
    Last Post: 01-03-2013, 07:47 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