473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to work with the command "Refresh"

Dear reader,

If I change the content of a field in an event procedure and in the same
procedure I do a refresh, the refresh has no effect. The code in the event
is as follows:

If IsNull(Me.WorkLoad_No01) Then

Me.WorkLoad_No01.Value = "*"

Me.WorkLoad_No01.BackColor = 65535 'Yellow

Me.WorkLoad_Hrs = Me.WorkLoad_Hrs + 40

Else

Me.WorkLoad_No01.Value = Null

Me.WorkLoad_No01.BackColor = -2147483643 'Blank

Me.WorkLoad_Hrs = Me.WorkLoad_Hrs - 40

End If

Me.Refresh

Forms.F102m_Workload.Refresh

Forms.F101m_Workload.Refresh

How to handle the refresh to have effect on the changes I made.

Tanks for any help.

Kind regards,

Simon

Mar 8 '08 #1
4 2523
What exactly are you expecting Refresh to do? What do you mean when you say
"the refresh has no effect?" Refresh is intended to be used in multi-user
apps so that if User A makes a change on Joe Blow's record, User B can
Refresh and see the change. It does not save changes to the underlying table
nor do a Requery.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200803/1

Mar 8 '08 #2
Refresh is used to get the latest data from the underlying table. If you're
updating the record yourself, then you shouldn't need Refresh at all.

It's possible that your Refresh below is actually removing your (unsaved)
changes by replacing them with what's stored in the table. Try taking out
the Refresh and see what happens.

"Simon" <Sv********@Versatel.nlwrote in message
news:47**********************@news.tele2.nl...
Dear reader,

If I change the content of a field in an event procedure and in the same
procedure I do a refresh, the refresh has no effect. The code in the event
is as follows:

If IsNull(Me.WorkLoad_No01) Then

Me.WorkLoad_No01.Value = "*"

Me.WorkLoad_No01.BackColor = 65535 'Yellow

Me.WorkLoad_Hrs = Me.WorkLoad_Hrs + 40

Else

Me.WorkLoad_No01.Value = Null

Me.WorkLoad_No01.BackColor = -2147483643 'Blank

Me.WorkLoad_Hrs = Me.WorkLoad_Hrs - 40

End If

Me.Refresh

Forms.F102m_Workload.Refresh

Forms.F101m_Workload.Refresh

How to handle the refresh to have effect on the changes I made.

Tanks for any help.

Kind regards,

Simon

Mar 8 '08 #3
I have two forms; FormA and FormB. Both forms are open.
In FormA there is a field FielA and the control source is:
=Forms.FormB.SumFieldB.
In FormB there is a field with the name SumFielB and the control source
is:
=Sum(FieldB)
By a change in FielB the SumFieldB is changed as well but the content of
FieldA in FormA is not changed. How to synchronise FieldA in FormA as the
FieldB in FormB is changed.

Tanks for any sugestion

"Linq Adams via AccessMonster.com" <u28780@uweschreef in bericht
news:80da2b51e71b8@uwe...
What exactly are you expecting Refresh to do? What do you mean when you
say
"the refresh has no effect?" Refresh is intended to be used in
multi-user
apps so that if User A makes a change on Joe Blow's record, User B can
Refresh and see the change. It does not save changes to the underlying
table
nor do a Requery.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200803/1
>


Mar 8 '08 #4
On Mar 8, 1:42*pm, "Simon" <SvanBee...@Versatel.nlwrote:
* I have two forms; FormA and FormB. Both forms are open.
* In FormA there is a field FielA and the control source is:
* =Forms.FormB.SumFieldB.
* In FormB there is a field with the name SumFielB and the control source
is:
* =Sum(FieldB)
* By a change in FielB the SumFieldB is changed as well but the content of
FieldA in FormA is not changed. How to synchronise FieldA in FormA as the
FieldB in FormB is changed.

* Tanks for any sugestion

* "Linq Adams via AccessMonster.com" <u28780@uweschreef in berichtnews:80da2b51e71b8@uwe...
* What exactly are you expecting Refresh to do? What do you mean when you
say
* "the refresh has no effect?" Refresh is intended to be used in
multi-user
* apps so that if User A makes a change on Joe Blow's record, User B can
* Refresh and see the change. It does not save changes to the underlying
table
* nor do a Requery.
* >
* --
* There's ALWAYS more than one way to skin a cat!
* >
* Answers/posts based on Access 2000/2003
* >
* Message posted via AccessMonster.com
* >http://www.accessmonster.com/Uwe/For...ms-access/2008....
* >
Requery the control instead of refreshing. you will need something to
cause the refresh to happen. usually when i am doing this i use the
lost focus on the control that i have just put input on and tell it to
cause the other control to requery.

private sub txtboxmytypeinfield_lost_focus()
forms!forma.form.txtthecontroltorequery.requery
end sub

or something like that.
Mar 9 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Udi Zisser | last post by:
Hello, any idea why this does not work? or how do i get this thing to work? <BASE HREF="http://localhost/thedude/"> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html"> I'm adding...
2
by: John Baker | last post by:
Hi: I have a Pop Up form that involves a main form and sub form. The sub form has the results of a query on the main form. I need to automatically perform exactly he same action that takes...
1
by: David | last post by:
how can I force the "document.execCommand("Refresh");" command to refresh page only one time?
1
by: Chumley Walrus | last post by:
I'm trying to use : <META HTTP-EQUIV="Refresh" CONTENT="180; URL=main.aspx"> to refresh a mobile page (made in vs.net with the MMIT) for a page that I need to refresh every 3 minutes, but I...
3
by: George Durzi | last post by:
I'm using the following tag to refresh my page every 3 minutes. <meta http-equiv="refresh" content="180; URL=default.aspx"> However, it's bound to happen that a user is working on the page, and...
2
by: ujjc001 | last post by:
For some reason I can't Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout * 60) + 60) & "; URL=default.aspx") to add the tag into the header. In the source the refresh header is...
1
by: IkBenHet | last post by:
Hello, Currently I am using a large input form on a website that is based on ASP and JavaScript. Depending on the values that are filled in by the user the forms does a refresh and makes...
4
by: simon | last post by:
hello, i have a section of a page that has multiple dropdowns. each dropdown calls the same method on a change of selection by the user. the method loops over all the dropdowns and if the newly...
0
by: sagarp86 | last post by:
How to lock / deactivate "Refresh" and "Back" button on browser. Problem is in voting application. Once we click for a vote application goes to next page and increament one vote in the database....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.