A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Update



 
 
Thread Tools Display Modes
  #1  
Old August 14th, 2004, 09:44 PM
Derek
external usenet poster
 
Posts: n/a
Default 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  
Old August 15th, 2004, 04:00 AM
Albert D. Kallal
external usenet poster
 
Posts: n/a
Default

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  
Old August 15th, 2004, 12:21 PM
Derek
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.