Help please assigning column and rows
Hi, I need to add a bunch of data by first people
selecting from comboboxes what they want and then hitting
a Add command button to fill a grid but I don't know how
to assign each one to the right column and row
Here's what I have and what I would like it to look like
if possible.... can anyone help??? thanks
strSQL = "Select distinct(Classid)from GroupClassPlan
where groupid = '" + Trim(txtGroupID) + "'"
Set RS = db.OpenRecordset(strSQL)
If RS.EOF = True And RS.BOF = True Then
MsgBox "GroupID not found", vbCritical, "Warning!"
Exit Sub
End If
Do Until RS.EOF
cboClassID.AddItem CStr(RS(0))
RS.MoveNext
Loop
RS.Close
strSQL = "Select distinct(Planid)from GroupClassPlan where
groupid = '" + Trim(txtGroupID) + "'"
Set RS = db.OpenRecordset(strSQL)
If RS.EOF = True And RS.BOF = True Then
MsgBox "GroupID not found", vbCritical, "Warning!"
Exit Sub
End If
Do Until RS.EOF
cboPlanID.AddItem CStr(RS(0))
RS.MoveNext
Loop
RS.Close
strSQL = "Select distinct(BusCat)from GroupClassPlan where
groupid = '" + Trim(txtGroupID) + "'"
Set RS = db.OpenRecordset(strSQL)
If RS.EOF = True And RS.BOF = True Then
MsgBox "GroupID not found", vbCritical, "Warning!"
Exit Sub
End If
Do Until RS.EOF
cboBusCat.AddItem CStr(RS(0))
RS.MoveNext
Loop
RS.Close
strGroupID = Me.txtGroupID
'Load the ComboBox's list.
grdSearchCriteria.AddItem strGroupID
grdSearchCriteria.AddItem cboClassID
grdSearchCriteria.AddItem cboPlanID
grdSearchCriteria.AddItem cboBusCat
I want it to put these things in a grid that looks like
this and for the subsequent rows hit a search button that
then adds that information???
GroupID Class ID Plan ID Bus Cat
1 A B
2 D
|