Question Janus Grid - populate row with data, one column lookup from sub-table.

mtsdon

New member
Joined
Mar 22, 2011
Messages
1
Programming Experience
Beginner
I am new to MS Access and Janus Grid. I have a form to maintain a lookup table, which has one column tied to a sub-table. Table TBLOPENENROLLMENTPERIODS has columns (OEID PK; NAME; BEGINDATE; ENDDATE; PLANID (FK)). The sub table, tied to PLANID,is TLKPOPENENROLLMENTPLAN, with cols: PLANID (PK); NAME.

I have in my script:
Case "tblopenenrollmentperiods"
lblMain.Caption = "Open Enrollment Periods"
strTableName = Item.Tag
'set column header caption
grdMain.Columns("name").Caption = "Open Enrollment Name *"
grdMain.Columns("begindate").Caption = "Begin Date *"
grdMain.Columns("enddate").Caption = "End Date *"
grdMain.Columns("planid").Caption = "Plan *"
grdMain.Columns("planid").MaxRowsInCardView = 12
grdMain.Columns("planid").Selectable = Tru
grdMain.Columns("planid").FetchData = True
grdMain.Columns(4).AutoSize
grdMain.Columns(3).AutoSize
grdMain.Columns(2).AutoSize
grdMain.Columns(1).Visible = False

' section to add the dropdown field value
'this section needs work
Set col = grdMain.Columns("planid")
Set rs = New ADODB.Recordset
' use a client-side cursor
rs.CursorLocation = adUseClient
' create the recordset using the linked tables as specified in the button bar item

Call rs.Open("select * from tblopenenrollmentperiods order by oeid", cnnConnectiontoOracle, adOpenKeyset, adLockOptimistic)

--------
I can get the script to populate the table columns, but can't get it to grab the "NAME" form the sub-table and populate the "PLANID" column of the main table.

You can see where I say 'this section needs work', that I don't understand how to make this happen.

Can anyone explain or make a simple suggestion? Or suggest another forum if this one is not the correct forum.

Thanks in advance.
 
Back
Top