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  

Updating subforms not working



 
 
Thread Tools Display Modes
  #1  
Old January 8th, 2010, 11:18 PM posted to microsoft.public.access.forms
Shawn
external usenet poster
 
Posts: 176
Default Updating subforms not working

main form has a dropdown combot box selecting query values which updates a
record on main form.
Subform being dispaly references this value to display records from a second
table.

But when I select a value the subform doesn't change.
but then I noticed that the sub form is one value behind, not always.
select employee but emolpyee detail records don't update.
select another employee and last employee records gets displayed.

private sub cbEmployee_Change()
docmd.Save
Me.EmployeeDetails.Requery
end sub

butthis doesn't seem to work.
  #2  
Old January 9th, 2010, 02:45 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Updating subforms not working

Try replacing the Change event with the AfterUpdate event (Change fires with
each keystroke) and replace:

docmd.Save

Me.Dirty = False
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Shawn" wrote in message
...
main form has a dropdown combot box selecting query values which updates a
record on main form.
Subform being dispaly references this value to display records from a
second
table.

But when I select a value the subform doesn't change.
but then I noticed that the sub form is one value behind, not always.
select employee but emolpyee detail records don't update.
select another employee and last employee records gets displayed.

private sub cbEmployee_Change()
docmd.Save
Me.EmployeeDetails.Requery
end sub

butthis doesn't seem to work.



  #3  
Old January 9th, 2010, 07:53 AM posted to microsoft.public.access.forms
Shawn
external usenet poster
 
Posts: 176
Default Updating subforms not working

ok that works.

Thanks.

"Arvin Meyer [MVP]" wrote:

Try replacing the Change event with the AfterUpdate event (Change fires with
each keystroke) and replace:

docmd.Save

Me.Dirty = False
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Shawn" wrote in message
...
main form has a dropdown combot box selecting query values which updates a
record on main form.
Subform being dispaly references this value to display records from a
second
table.

But when I select a value the subform doesn't change.
but then I noticed that the sub form is one value behind, not always.
select employee but emolpyee detail records don't update.
select another employee and last employee records gets displayed.

private sub cbEmployee_Change()
docmd.Save
Me.EmployeeDetails.Requery
end sub

butthis doesn't seem to work.



.

 




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 08:14 AM.


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