|
-
Mar 11th, 2001, 05:20 PM
#1
Thread Starter
Fanatic Member
Hi Everyone,
I currently have two forms named Members and New Members. The Members form has a bunch of text boxes filled with existing member information (i.e. First name, Last name, etc). At the bottom of the form there is a command button that opens up the New Members form. The new members form has several text boxes that need to be filled out in order to accept a new member. Once all fields in the new members form are filled out correctly and the user sends the information to the database the new member form is hidden from view (still leaving the original members form open). My question is this. Once a new member has been added to the database from the new members form, how can I get the original Members form to reload or update to show the new members information without shutting the program down and then restarting it? I would appreciate any help. Thank you.
-
Mar 11th, 2001, 05:23 PM
#2
you'll need to run the SQL statement over again to refresh the data. How are you getting the data, from a DataEvironment, or ADO recordset,or...?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 11th, 2001, 05:31 PM
#3
Thread Starter
Fanatic Member
Refresh Information
How do I set this up? I am using ADO. Do I need to run the SQL statement from the new members form right before I hide it? Please let me know where I should put the SQL statement. Thanks for your help.
-
Mar 11th, 2001, 05:38 PM
#4
I assume that you're using a control array for your textboxes and that the DataField prop is set at Design time...
Code:
Dim rsMembers As New ADODB.RecordSet
'frmNewMembers
Private Sub Form_UnLoad(Cancel As Integer)
Call frmMembers.RefreshList
End Sub
'frmMembers
Private Sub RefreshList()
With rsMembers
'ActiveConnection, LockType,CursorType, blah,blah,blah
.Source = "Members"
.Open Options:=adCmdTable
For Each Control In Me
If TypeOf Control Is TextBox Then
Set Control.DataSource = rsMembers
End IF
Next
.Close
End Sub
something like that...
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
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
|