UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Refresh Datasheet Form Without Refreshing Page, Access 2010 Web    
 
   
gdgonzal
post Apr 11 2012, 02:39 PM
Post #1

UtterAccess Addict
Posts: 124



Hello All:

I'm going a little nuts trying to figure this out. I have a form that enters data into a tbl; I also have this tbl represented as a datasheet form on the web. When I make a change to an existing report via the form I have to refresh the page in order to see the change within the datasheet form. Instead I would like the datasheet to display the change without having to refresh the web page. Now I know this is possible because the Project Web Database template does exactly this; it has a form, when you change an existing record in the form that change is automatically reflected within the datasheet.

I've replicated all of the macros that I could find within the tbl and related forms in the Projects Web Database but for some reason I cannot get this to work without manually refreshing the web page.

Any ideas?

Thank you
Go to the top of the page
 
+
LookupLife
post Apr 11 2012, 06:08 PM
Post #2

UtterAccess Enthusiast
Posts: 62



hi gdgonzal,

Assuming you've embedded the datasheet inside a subform you can either run a BrowseTo command or a Requery(subform name).
Trigger can be an AfterUpdate event in the "input" form.

Cheers!
Go to the top of the page
 
+
gdgonzal
post Apr 11 2012, 09:17 PM
Post #3

UtterAccess Addict
Posts: 124



Thanks Lookup...tried that and it doesn't seem to work. Ah!!!!!! (IMG:style_emoticons/default/iconfused.gif)
Go to the top of the page
 
+
bhicks11
post Apr 12 2012, 09:30 AM
Post #4

UtterAccess Addict
Posts: 274



Check the browseto - it's particular and you may not have it right.

B
Go to the top of the page
 
+
AlbertKallal
post Apr 13 2012, 07:18 PM
Post #5

UtterAccess VIP
Posts: 1,787
From: Edmonton, Alberta Canada



QUOTE (gdgonzal @ Apr 11 2012, 08:17 PM) *
Thanks Lookup...tried that and it doesn't seem to work. Ah!!!!!! (IMG:style_emoticons/default/iconfused.gif)

Try using the control name without [].

Remember, JUST the control name (you can use inteli-sense here). So NO forms! expression, but just control name of subform without [].

You cannot force a requery in other forms, but only a sub-form of the CURRENT form where the code is running. So this code has to be in the parent form of the datasheet.

Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
kallal@msn.com
Go to the top of the page
 
+
TheZjooj
post Nov 30 2012, 03:01 PM
Post #6

UtterAccess Guru
Posts: 620



I know this is an older thread so forgive me but I was compelled to post for posterity (IMG:style_emoticons/default/smile.gif) and because I was banging my head on the desk as to how Microsoft did it just like the OP was... I have a very simplistic view of the answer and I may be off base to what Albert and George would say but I am thinking I am close. At least it worked for me...

The way MS seems to have done this in the Orders (Goods) Web Database template (as well as several others) is that when a button is clicked on a form, in this case it is a navigation form, to open a completely different "Dialog mode" form, the macro for the button on the navigation form has a requery statement after the code that opens the modal "dialog form".

Basically the way it seems to work is that the macro code on the Navigation form "freezes" (for the lack of a better term) after the code to open the dialog form... but before the requery section can complete (circled in red in the attachment)...and it seems to just wait... then when the dialog form closes, the remaining portion of the macro finishes and the navigation form is requeried to reveal the newly added record.

See attached image for a visual on the macro code. The red circle is from the (Goods) Orders form (completely seperate form) that has a button on it to create a new order (opens a new form in Dialog Mode). Once the new order is completed (record Saved and dialog form Closed) the Navigation form code is able to finish running and it is then requeried revealing the newly added record.

Hope this helps someone in the future.

Regards,

Zjooj



Attached File(s)
Attached File  SampleRequery.JPG ( 22.5K ) Number of downloads: 0
 
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th June 2013 - 04:59 AM