LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning a single value to a column Peekaboo012885 Excel Discussion (Misc queries) 3 March 11th 09 09:18 PM
IF Then using a column of text and assigning a number to text Dan Excel Discussion (Misc queries) 5 August 20th 08 11:24 PM
Formula for assigning distinct name to first instance in a list ofduplicate rows. NickNameGoesHere Excel Worksheet Functions 1 March 16th 08 08:01 AM
assigning value to a column based on a table of values Jacob Excel Discussion (Misc queries) 3 January 13th 06 08:46 PM
assigning rows Breny Excel Worksheet Functions 1 November 8th 05 01:50 PM


All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"