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  

Refresh a subform after an Append Query



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2007, 07:43 AM posted to microsoft.public.access.forms
Stu M
external usenet poster
 
Posts: 1
Default Refresh a subform after an Append Query

Access XP running on WinXP sp2

Using a tabControl, on one of the tabs have two subforms. in the first
subform, I select three items from comboboxes and enter a numerical value in
a text box. values are then used to fill an append query along with
identifying customer information from the main form containing the
tabControl. a cmd buttom runs the VBA for the query. on the second subform,
the results are displayed in DataSheet view. the append query runs correctly,

the problem is the DataSheet does not update and display the new record.

second subform's record source is a select query, which I open and close
after the Append query runs. have tried me.requery; me.refresh; coresponding
DOCMD's to no avail.

any suggestions other that opening and closing the whole form?

Thanks in advance;
  #2  
Old January 4th, 2007, 01:52 PM posted to microsoft.public.access.forms
kingston via AccessMonster.com
external usenet poster
 
Posts: 620
Default Refresh a subform after an Append Query

If I understand correctly, you have a main form with two subforms and you
want actions in the first subform to requery the second subform. One way to
do this is to create a public procedure in the main form that refreshes the
second subform:

Public Sub RefreshSub2()
Me.SubformControl2.Requery
End Sub

Then call this procedure from the first subform after the data has been
changed:

Forms!MainForm.RefreshSub2

Stu M wrote:
Access XP running on WinXP sp2

Using a tabControl, on one of the tabs have two subforms. in the first
subform, I select three items from comboboxes and enter a numerical value in
a text box. values are then used to fill an append query along with
identifying customer information from the main form containing the
tabControl. a cmd buttom runs the VBA for the query. on the second subform,
the results are displayed in DataSheet view. the append query runs correctly,

the problem is the DataSheet does not update and display the new record.

second subform's record source is a select query, which I open and close
after the Append query runs. have tried me.requery; me.refresh; coresponding
DOCMD's to no avail.

any suggestions other that opening and closing the whole form?

Thanks in advance;


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200701/1

 




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


All times are GMT +1. The time now is 01:14 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.