473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

[VB6+ ACCESS] procedure print

If Index = 0 Then
Dim ac As Access.Application
Set ac = CreateObject("Access.Application")
ac.Visible = True ' se non lo metto, non fa l'anteprima
ac.DoCmd.RunCommand acCmdAppMaximize ' espande Access
ac.OpenCurrentDatabase (nome_db), False
ac.DoCmd.OpenReport "scheda_report", acViewPreview, , "[codice]=" &
Chr(34) & id & Chr(34)
ac.DoCmd.Maximize
ac.Application.Visible = True
ac.DoCmd.SelectObject acReport, , True
ac.DoCmd.RunCommand acCmdWindowHide

If Check1(0).value = vbChecked Then
Reports!scheda_report!scheda_sottoreport0.Visible = True
End If
If Check1(1).value = vbChecked Then
Reports!scheda_report!scheda_sottoreport1.Visible = True
End If
With Reports!scheda_report
If .Filter = vbNullString Then
.FilterOn = True
.Filter = " "
.Filter = vbNullString
Else
.Filter = .Filter
.FilterOn = True
End If
End With
Set ac = Nothing
Unload Form6
Else
Unload Form6
End If
End Sub

Ormai sto IMPAZZENDO non riesco a trovare l'errore in questa mia procedura
e ormai e
da piu di una settimana che ci lavoro sopra

la prima volta funziona tutto perfettamente la seconda volta mi da errore
Errore di automazione,
l'oggetto invocato si è disconnesso dai client corrispondenti
questo errore me lo da quando cerca di rendere visibile il sottoreport

ho inserito perfino questo filtro che ho trovato su google, ma senza alcun
successo

With Reports!scheda_report
If .Filter = vbNullString Then
.FilterOn = True
.Filter = " "
.Filter = vbNullString
Else
.Filter = .Filter
.FilterOn = True
End If

End With


What is the problem??
Jul 17 '05 #1
0 3347

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wim van Rosmalen | last post by:
Hi folks, I've upgraded MS-Access 2002 to a MS-Access Project (adp), so now I have to deal with more sophisticated queries (may I call them so?) like stored procedures. I have a form with a...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
9
by: Terry | last post by:
I am converting (attempting) some vb6 code that makes vast use of interfaces. One of the major uses is to be able to split out Read-only access to an obect. Let me give you a simple (contrived)...
5
by: Easystart | last post by:
Hi, Sorry for my English. English is not my native tougue. I am working in MS Access 2000 with a SQLServer 2000 Backend database. MS Access 2000 is my GUI front end that has SQLServer linked...
0
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access...
2
by: Shananne81 | last post by:
Hi, Could you please tell me why iam getting this error (Run time error '424' object required) Im trying to display data from 3 tables(customer02,account03 and transaction02) using a grid for the...
5
by: pa2ratczi | last post by:
Hi there VB6 master i have a question, how can i access my mysql database in vb6... am not very familiar inmysql that's why i dont know how to start... i have using vb6 & access for all my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.