|
-
Jun 27th, 2000, 12:52 AM
#1
Thread Starter
Junior Member
I can't figure out how after making an SQL statement to get the results back to the main form. It looks like it searches, finds the record and then the form disappears and the new information doesn't appear. Any help would be great.
-
Jun 27th, 2000, 01:23 AM
#2
Junior Member
Did you try the REFRESH staement.
Updates the objects in a collection to reflect the current database's schema.
Syntax
collection.Refresh
The collection placeholder is an object variable that represents a persistent collection.
-
Jun 27th, 2000, 02:56 AM
#3
Frenzied Member
-
Jun 27th, 2000, 03:01 AM
#4
Thread Starter
Junior Member
here is the Code.
Private Sub SearchButton_Click()
Dim fieldStr As String
Dim searchStr As String
searchStr = Form1.SearchString
fieldStr = Form1.ComboSelect.Text
frmMain.Gold.RecordSource = "SELECT * FROM [GOLD] WHERE " &
"[" & fieldStr & "] = '" & searchStr & _
"'"
frmMain.Gold.Refresh
Form1.Hide
End Sub
Joe
-
Jun 28th, 2000, 02:06 AM
#5
Thread Starter
Junior Member
Yeah Gold is my data control for the program. It holds our database.
-
Jun 29th, 2000, 01:48 AM
#6
Frenzied Member
Sadly, data controls are not my forte. Is control being set to frmmain once you hide from1? Does a formmain.refresh (or formmain.show) help?
[Edited by JHausmann on 06-29-2000 at 03:06 PM]
-
Jun 29th, 2000, 02:01 AM
#7
Lively Member
What are you using to show the retrieved data in, a datagrid, text boxes, etc???
You may need to refresh these connections to the data control. If it is a grid, you could try rebinding the grid and this might work.
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
|