|
-
Oct 12th, 2000, 12:52 PM
#1
Thread Starter
Member
I am developing a application in MS Access....In that there is a form which shows one record at a time, the fields being shown in different Text boxes.I want to add print functionality so that it prints the desired record...I tried using the following code...But I keep on getting message "Cannot create ActiveX object"...
Doyou have any ideas...
Dim prntObj As New VB.Global
prntObj.Printer.NewPage
thanks
neelesh
-
Oct 12th, 2000, 01:00 PM
#2
Fanatic Member
What Version of Access are you using? 2000 brings up the Button wizard when you place a button on it then select the Print command.
Spud
-
Oct 12th, 2000, 01:01 PM
#3
Thread Starter
Member
-
Oct 12th, 2000, 01:04 PM
#4
Thread Starter
Member
The problem is if I use the code generated by wizard, it only prints whatever is visible in the client window..I want to print the contents of each & every field (which corresponds to record)
-
Oct 12th, 2000, 01:14 PM
#5
Just make a report that prints what you want and have the button trigger the report. You can pass variables to the report and filter it so it only shows one record. Email me for details.
-
Oct 12th, 2000, 01:28 PM
#6
Fanatic Member
Dont know if this will help but I ran a macro and converted it to code and got the following to print all:On Error GoTo
Command6_Enter_Err
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
Command6_Enter_Exit:
Exit Sub
Command6_Enter_Err:
MsgBox Error$
Resume Command6_Enter_Exit
Hope it helps
Spud
-
Oct 12th, 2000, 01:42 PM
#7
Thread Starter
Member
Hello Edneeis
I just finished creating a Report...It looks great...Now if you could tell me how to filter records I will really appreciate....I just need to print the current record...Also how to trigger that from the Button?
thanks
neelesh
-
Oct 12th, 2000, 01:49 PM
#8
Thread Starter
Member
spud,
I need to print only the selected record...Also I need to display everything even though its not visible on the form..
thanks
neelesh
-
Jan 3rd, 2001, 06:42 PM
#9
Sorry for the long wait to reply, assuming rs is your recordset or whatever holds it:
Code:
rs.Filter="RecordID=" & PassedID
Then you pass the current record ID or any field that is unique and use it as PassedID.
-
Jan 3rd, 2001, 06:52 PM
#10
Thread Starter
Member
Thanks for ur reply!
I think I did something like that(can't remember now)...
But I do appreciate u getting bak 2 me...
thanks again
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
|