If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Update
Hi All
How the hell do i use Update on a subforms records. Will this allow me to print imediately without refreshing records. When I have a new record in the main form and a new one in the subform I get an error when trying to print. Help it's driving me crazy |
#2
|
|||
|
|||
You don't mention if your print button is on the main form, or the sub-form.
The best solution is to make a report that shows all of the information, and then restrict this report to the ONE MAIN record you are looking at. And, yes, before you launch the report, you need to force a disk write. The code to print the ONE record is: me.Refresh ' force disk write docmd.OpenReport "yourReportName",acViewPreview,,"id = " & me.id -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada http://www.attcanada.net/~kallal.msn |
#3
|
|||
|
|||
Thanks Albert
The problem is not selecting the record to print but I have a report that prints only the curent record based on Main and subform. I use a popup form to select standard letters that I programatically insert into the subforms underlying table and then move to the new record on the subform. So it may be that I am trying to print before the record is dirty. If I do this I am reasonably sure that I have to update the record because refresh just does not work. I have to close the form and reopen it. I have read about Update but cannot figure out how to select the subforms record to force an update. Any Ideas? -----Original Message----- You don't mention if your print button is on the main form, or the sub-form. The best solution is to make a report that shows all of the information, and then restrict this report to the ONE MAIN record you are looking at. And, yes, before you launch the report, you need to force a disk write. The code to print the ONE record is: me.Refresh ' force disk write docmd.OpenReport "yourReportName",acViewPreview,,"id = " & me.id -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada http://www.attcanada.net/~kallal.msn . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Acess 2002 Service Pack 3 | J. Haney | General Discussion | 2 | July 29th, 2004 12:59 AM |
Auto Update Problem - OE Now Not Deleting Some Messages | Kirk Kridner | Outlook Express | 0 | July 16th, 2004 09:31 PM |
MS Jet --> MS Access Data Source: How to obtain Update lock | André Hartmann | Running & Setting Up Queries | 1 | July 16th, 2004 12:21 PM |
Update another table with a Max record query | Ngan | Running & Setting Up Queries | 2 | June 22nd, 2004 05:01 PM |
Why no update? Help! | Brian | New Users | 1 | May 6th, 2004 11:15 AM |