dbTalk Databases Forums  

refresh subform doesn't work

comp.databases.ms-access comp.databases.ms-access


Discuss refresh subform doesn't work in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Co
 
Posts: n/a

Default refresh subform doesn't work - 09-06-2010 , 02:51 AM






Hi All,

I have a form (A) with a subform (B).
The subform gets loaded with:

MyID = Forms![FrmTabelTotaal].[subFrmTabelTotaal]!ID
NewQuery = "SELECT * FROM Tabel_Aanvragen WHERE [ID]=" & CInt(MyID)
Forms![Tabel_Aanvragen].Form.RecordSource = NewQuery

Now when I click a button on my form (A) it opens a new form where I
can add a new record.
When I close the form and add the record I want it to show in my
subform (B) but I don't know how.

Regards,
Marco

Reply With Quote
  #2  
Old   
Stuart McCall
 
Posts: n/a

Default Re: refresh subform doesn't work - 09-06-2010 , 06:18 AM






"Co" <vonclausowitz (AT) gmail (DOT) com> wrote

Quote:
Hi All,

I have a form (A) with a subform (B).
The subform gets loaded with:

MyID = Forms![FrmTabelTotaal].[subFrmTabelTotaal]!ID
NewQuery = "SELECT * FROM Tabel_Aanvragen WHERE [ID]=" & CInt(MyID)
Forms![Tabel_Aanvragen].Form.RecordSource = NewQuery

Now when I click a button on my form (A) it opens a new form where I
can add a new record.
When I close the form and add the record I want it to show in my
subform (B) but I don't know how.

Regards,
Marco
Add this code to the Close event for the add record form:

Me.Dirty = False
Forms![Tabel_Aanvragen].Form.ReQuery

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.