-
To:VBX Tutor...Combo Solved!
The programming suggested, using Form_Load, only woked with ONE MySql, but after seeveral days of rest, I found that Defining the MySql in the on Enter event for the combobox worked...IF MySql was a Global variable. Code for two choices follows:
[VBA]Option Compare Database
Dim Mysql As String 'Having been burned with "Global" values, Ikeep
them to a minimum
Private Sub Combo1_Click()
Text13.Value = Combo1 'Signals to developer that he/she has
'something to go on!
End Sub
Private Sub Combo1_Enter()
Combo1.RowSource = Mysql
End Sub
Private Sub Form_Load()
Forms!Form1.Combo1.RowSourceType = "Table/Query"
End Sub
Private Sub Option6_MouseDown(Button As Integer, Shift As Integer,
XAs Single, Y As Single)
Dim MyComments As String
Dim MyTable As String
Forms!Form1.Combo1 = "" 'Clears out contents from last choice.
MyTable = " Table1 "
MyComments = " Comments "
Mysql = "Select " & MyComments & "FROM " & MyTable & ";"
End Sub
Private Sub Option8_GotFocus()
Dim MyComments As String
Dim MyTable As String
Forms!Form1.Combo1 = ""
MyTable = " Table2 "
MyComments = " Comments "
Mysql = "Select " & MyComments & "FROM " & MyTable & ";"
End Sub [/VBA]
Now A simpler priblem: How to "Click' in the Combo after clicking on an option?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules