Mutiple Syntax in one sub

Petros

Registered User.
Local time
Today, 21:35
Joined
Jun 30, 2010
Messages
145
Hi all, trying to make my self understood i wonder if it is possible to
include "multiple" syntax in one sub..the same sub would also have to include more code..IF statements etc

Private Sub cmbo1_AfterUpdate()

Me!cmbo2.RowSource = "Select tbl1.text2 " & _
"FROM tbl1 " & _
"WHERE tbl1.text1 = '" & cmbo1.text1 & "' " & _
"ORDER BY tbl1.text2;"

----

Me!cmbo3.RowSource = "Select tbl2.text2 " & _
"FROM tbl2 " & _
"WHERE tbl2.text1 = '" & cmbo1.text1 & "' " & _
"ORDER BY tbl2.text2;"


End sub

Thanks!
 
You should have no trouble setting the RowSource of any number of ComboBoxes in the AfterUpdate event of a cbo; not with the syntax you have there of course.
 

Users who are viewing this thread

Back
Top Bottom