PC Review


Reply
Thread Tools Rate Thread

Data not showing up in Subform

 
 
Ayo
Guest
Posts: n/a
 
      27th May 2009
I have amain form with two subforms embeded into two TabCtl Pages. I have 3
Tables: tblSiteList, tblMaterialsDatabase and tblMilestones. They are the
following fields in common so I used them as the Link Fields, Master & Child.
tblSiteList:Site Id, Market, NLP
tblMaterialsDatabase:Site ID, Market, NLP
tblMilestones:Candidate Id,Market Name,UMTS NLP Status

tblSiteList has a One-to-Many relationship with the other two tables.
Currently I only have one form with tblSiteList as the Record Source. In the
form there is a TabCtl with 2 Pages named Materials and Milestones
respectively.
In each page there is a subform "tblMilestones subform" on Milestones and
"tblMaterialsDatabase subform" on Materials. The goal is to have the subform
display data based on Site Id, Market, NLP fields on the mainform. Also the
Materials tab also have a combobox called cmbShoppingCart which is used in
conjunction withthe Site Id, Market, NLP fields to narrow down the result in
the tblMilestones subform." But for some reason I am not getting anything in
my subforms and I can't figure it out.
I need help. I have been struggling with this now for about 4 days with no
results. Please help.

Private Sub psBuildComboSQL()
Dim strSQL As String
strSQL = "SELECT DISTINCT [Shopping Cart] " & _
"FROM tblMaterialsDatabase " & _
"WHERE ([Site ID] = """ & Me.cmbSiteId & """) AND " & _
"([Market] = """ & Me.Market & """) AND " & _
"([NLP] = """ & Me.NLP & """) " & _
"ORDER BY [Shopping Cart]"
Me.cmbShoppingCart.RowSource = strSQL
Me.cmbShoppingCart = Null
Me.cmbShoppingCart.Requery
End Sub

Private Sub psBuildMilestoneSubformSQL()
Dim strSubformSQL As String, siteID As String
strSubformSQL = "SELECT * " & _
"FROM tblMilestones " & _
"WHERE ([Candidate Id] = "" & Me.cmbSiteId & "") AND " & _
"([Market Name] = "" & Me.Market & "") AND " & _
"([UMTS NLP Status] = "" & Me.NLP & "")"
Me.tblMilestones_subform.Form.RecordSource = strSubformSQL
End Sub

Private Sub psBuildSubformSQL()
Dim strSubformSQL As String
strSubformSQL = "SELECT * " & _
"FROM tblMaterialsDatabase " & _
"WHERE ([Site ID] = """ & Me.cmbSiteId & """) AND " & _
"([Market] = """ & Me.Market & """) AND " & _
"([NLP] = """ & Me.NLP & """) AND " & _
"([Shopping Cart] = """ & Me.cmbShoppingCart & """)"
Me.tblMaterialsDatabase_subform.Form.RecordSource = strSubformSQL
End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data not showing up in Subform Ayo Microsoft Access VBA Modules 4 28th May 2009 05:55 AM
Subform not showing all data =?Utf-8?B?QnVua3k=?= Microsoft Access 18 2nd Oct 2007 02:19 PM
subform not showing data =?Utf-8?B?TG9uaSAtIFJXVA==?= Microsoft Access Forms 3 21st Jul 2007 05:30 PM
SubForm Not Showing Data Bob Quintal Microsoft Access Forms 2 2nd Jul 2007 07:32 PM
Subform data not showing up Jerry Microsoft Access 1 9th Sep 2004 04:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:15 AM.