Specify Column from Dropbox in VBA (1 Viewer)

DMerchen

Registered User.
Local time
Today, 13:17
Joined
Sep 9, 2008
Messages
94
I am trying to populate an email out of VBA with information from a form. I am just running into one problem. The data that is being pulled for RMA Initiated By in the next to last line pulls the index number instead of the 2nd column which is the name. How can I specify which column to pull from? I checked my properties for the table and the form and the column widths are 0";1" , but I can't figure out how to grab that second column in my VBA code. I am sure it is super simple though. Thanks!!

.Subject = "01 RMA Initiated- -Awaiting Arrival of Parts From Customer " & "RMA: " & Forms![RMA_Admin]![RMA_Number]
'.attachments.Add attmt
.Body = "01 RMA Initiated- -Awaiting Arrival of Parts From Customer " & "RMA: " & Forms![RMA_Admin]![RMA_Number] & vbNewLine & _
"Customer: " & Forms![RMA_Admin]![Customer] & vbNewLine & _
"Part Number / Description: " & Forms![RMA_Admin]![Part Number / Description] & vbNewLine & _
"Serial Numbers: " & Forms![RMA_Admin]![Serial Numbers] & vbNewLine & _
"Customer Complaint: " & Forms![RMA_Admin]![Customer Complaint] & vbNewLine & _
"Initiated By: " & Forms![RMA_Admin]![RMA Initiated By] & vbNewLine & _
"Initiated Date: " & Forms![RMA_Admin]![RMA Initiated Date]
.Display
'.Send
 

bob fitz

AWF VIP
Local time
Today, 20:17
Joined
May 23, 2011
Messages
4,729
Try something like:
=Me.ControlName.Column(1)
Because the column count is zero based this will return the second column value.
 

DMerchen

Registered User.
Local time
Today, 13:17
Joined
Sep 9, 2008
Messages
94
Realized I made this much more difficult than it need to be specifying the form instead of using Me.Control name. Thanks for the direction and making my life easier!!
 

bob fitz

AWF VIP
Local time
Today, 20:17
Joined
May 23, 2011
Messages
4,729
Realized I made this much more difficult than it need to be specifying the form instead of using Me.Control name. Thanks for the direction and making my life easier!!
You're welcome. Glad to help.:)
 

Users who are viewing this thread

Top Bottom