I hv created crystal report 8 in vb6....
I'm having cmbloc(combo box) shows list of locations,I did code to show that
if cmbloc is empty or has selected value then location field on crystal report sh'd display text as "all locations"..........
But error occurs : object required at the given line......
If particular code removed then location field shows by default location of first record.... plz help
Private Sub CmdRpt6_Click()
SQL = "SELECT NOTE.*,LOCATION.LOC_NAME From NOTE,LOCATION "
SQL = SQL + " Where NOTE.LOC_ID=LOCATION.LOC_ID"
Set RS = CON.Execute(SQL)
Report6.Database.LogOnServer "pdsORA7.dll", "soft", "", "aus", "aus123"
If CmbLoc = Empty Or CmbLoc.Text = "<ALL LOCATIONS>" Then
Report6.Field9.Value = "ALL LOCATIONS" // ERROR LINE : OBJECT REQUIRED
Report6.SQLQueryString = SQL
CRViewer1.ReportSource = Report6