|
-
Feb 2nd, 2000, 05:41 AM
#1
Thread Starter
New Member
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...
-
Feb 2nd, 2000, 05:46 AM
#2
So Unbanned
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.
-
Feb 2nd, 2000, 06:00 AM
#3
Thread Starter
New Member
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...
-
Feb 2nd, 2000, 06:06 AM
#4
Member
I'm not sure I understand the question. Are you asking how to clear the controls on a form?
-
Feb 2nd, 2000, 06:22 AM
#5
Addicted Member
If your just trying to refresh the data fields, why don't you just refresh the recordset(s)
-
Feb 2nd, 2000, 06:24 AM
#6
Thread Starter
New Member
ok the, how do you reset the controlls on a form..?
-
Feb 8th, 2000, 02:52 AM
#7
Lively Member
Did you ever figure out how to do this? I have the same problem....
-
Feb 8th, 2000, 03:10 AM
#8
Addicted Member
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.
-
Feb 8th, 2000, 03:24 AM
#9
Lively Member
DO Form.refresh
Majority of the controls have refresh property
-
Feb 8th, 2000, 03:35 AM
#10
Lively Member
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!
-
Feb 8th, 2000, 04:21 AM
#11
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
-
Feb 8th, 2000, 09:55 AM
#12
Member
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 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|