Is there any way of refreshing or reloading a form without unloading and then having to reload again??? If anyone knows, please tell me, I'm only a beginner you see...
Printable View
Is there any way of refreshing or reloading a form without unloading and then having to reload again??? If anyone knows, please tell me, I'm only a beginner you see...
Do you mean where you hide the form then want to recall it for future use? If you just hide the form:
Form1.Hide
and show the form
Form1.Show
this keeps the form in memory so if it complicated it loads faster.
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
no.. I din't want to hide it, I know how to do that, I wanted to refresh it, so that all of the datafields would reset and the form reloads...
I'm not sure I understand the question. Are you asking how to clear the controls on a form?
If your just trying to refresh the data fields, why don't you just refresh the recordset(s)
ok the, how do you reset the controlls on a form..?
Did you ever figure out how to do this? I have the same problem....
If you are using a data control, you just need to call the refresh method of the data control: data1.refresh, this should update all the linked controls.
DO Form.refresh
Majority of the controls have refresh property
I think he is having the same problem as I. I tried the form.refresh with no luck. Since my form populates its text boxes when the form loads that appears to be the only way to do it, close the form and re-open it. There has to be another way!
If you populate your Controls in the Forms Load Event, there's nothing to stop you calling that same Event in a Buttons Click Event, Alternatively create a Sub in the Form for setting the Default Values of your Controls, then call this from both the Form Load Event and the Reset Button Click Event, ie.
Code:Private Sub Form_Load()
Text1 = "Default"
Check1 = 0
List1.Clear
End Sub
Private Sub cmdReset_Click()
Form_Load
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Certified AllExperts Expert
Hi,
I am not sure what are the controls you are using to update a record to the database.
here is some options:
1: If you are using datacontrol use refresh method and movelast to see the last updated record.otherwise it will go to the first record after updating.
2: The same movelast if you are using recordset.
3: if you are using dataenvironment you need to reset all the textboxes with the respective datamember,datasource and the databfield again to see online update.
If you want anything more just paste your code here. I will try my best.
Because I had the same problem and I solved it.I was using dataenvironment.
thanks
karun :cool: