Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assigning a single value to a column | Excel Discussion (Misc queries) | |||
IF Then using a column of text and assigning a number to text | Excel Discussion (Misc queries) | |||
Formula for assigning distinct name to first instance in a list ofduplicate rows. | Excel Worksheet Functions | |||
assigning value to a column based on a table of values | Excel Discussion (Misc queries) | |||
assigning rows | Excel Worksheet Functions |