|
-
Aug 5th, 2008, 07:03 AM
#1
Thread Starter
New Member
Vba to crystal DSN-Less Connection help
Hi,
I am trying to build crystal reports into an access database using crystal reports control ocx.
I tried a DSN-Less connection method but it brought back an error (Cannot open SQL Server)
I have been searching this for days now and not getting anywhere please can someone help me.
This is my code
CrystalReport.ReportFileName = "ReportName"
CrystalReport.Connect = "DSN=DSNNAME;" (I want to use dsn-less to open access mdb file)
CrystalReport.DiscardSavedData = True
CrystalReport.SelectionFormula = "{Qry_StaffUserDefined.Client_ID} Like " & Chr(34) & Form_frm_Reports.Client_ID.Value & Chr(34) _
& " and {Qry_StaffUserDefined.Location} Like " & Chr(34) & Form_frm_Reports.Location.Value & Chr(34) _
& " and {Qry_StaffUserDefined.Location} Like " & Chr(34) & Form_frm_Reports.Roster_Name.Value & Chr(34)
CrystalReport.Action = 1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|