By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 1,712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

Strange problem: Crash in print preview when opened by switchboard

P: n/a
Has anyone encountered this before?

When a report is opened by my switchboard (i.e. either directly, or
through code run by the switchboard), a crash occurs when changing
print settings.

So far the following fix seems to work:

Set con = Application.CurrentProject.connection
Set rs = CreateObject("ADODB.Recordset")
stSql = "SELECT * FROM [Switchboard Items] "
stSql = stSql & "WHERE [SwitchboardID]=" & Me![SwitchboardID] & " AND
[ItemNumber]=" & intBtn
rs.Open stSql, con, 1 ' 1 = adOpenKeyset


Dim qdf as QueryDef
Set qdf = CurrentDb.CreateQueryDef("")
stSql = "SELECT * FROM [Switchboard Items] "
stSql = stSql & "WHERE [SwitchboardID]=" & Me![SwitchboardID] & " AND
[ItemNumber]=" & intBtn
qdf.SQL = stSql
Set rs = qdf.OpenRecordset(dbOpenDynaset)

I am running Access 2003 on Windows 2000.
This issue has occured on two out of three similar computers.

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.