Results 1 to 4 of 4
  1. #1
    Juan4412 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2010
    Posts
    209

    VBA To Get Value From Text Box

    On A user form I hava two text boxes called firstie & secondie. I want to get the value from these text boxes and store in a VBA Variable. What is the appropriate way to do such? I tried the below and it is not storing the value in the variable
    Code:
    Dim firstorder As String, lastorder As String
    	firstorder = firstie.Text
    	lastorder = secondie.Text


  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    firstorder=Me!firstie
    lastorder=Me!secondie

  3. #3
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183
    Quote Originally Posted by aytee111 View Post
    firstorder=Me!firstie
    lastorder=Me!secondie
    I know this is solved but I was wondering what the difference is in using a period vrs exclamation?
    Code:
    EG: Me.FirstName = value  or Me!FirstName = value

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Google "bang vs dot" and you will be inundated!

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

Similar Threads

  1. Replies: 1
    Last Post: 05-18-2016, 09:46 AM
  2. Replies: 2
    Last Post: 07-09-2014, 12:43 PM
  3. Replies: 1
    Last Post: 03-27-2014, 06:42 AM
  4. Replies: 3
    Last Post: 02-07-2013, 09:53 PM
  5. Replies: 1
    Last Post: 05-24-2012, 04:59 AM

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