Hi,
I am kind of new to VBA so any help would be greatly appreciated. I am trying to set the captions of buttons on my form by running a query. Here's what I have so far.
Dim LSQL As String
'Display all customers
LSQL = "select LetterName from Letters where LetterID = 1"
Form_frmReportByInfo.RecordSource = LSQL
Command10.Caption = LSQL
So in other words I want the caption of Command10 to be the LetterName. I have multiple buttons and I want to set each one to be a different LetterName by running a query for each. Please advise.
I am kind of new to VBA so any help would be greatly appreciated. I am trying to set the captions of buttons on my form by running a query. Here's what I have so far.
Dim LSQL As String
'Display all customers
LSQL = "select LetterName from Letters where LetterID = 1"
Form_frmReportByInfo.RecordSource = LSQL
Command10.Caption = LSQL
So in other words I want the caption of Command10 to be the LetterName. I have multiple buttons and I want to set each one to be a different LetterName by running a query for each. Please advise.