Results 1 to 7 of 7

Thread: Refreshing

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Location
    Rio Rancho, NM
    Posts
    21
    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.

    Joe
    Rio Rancho, NM
    Bank of America
    Telecomm Analyst
    [email protected]

  2. #2
    Junior Member
    Join Date
    Jun 2000
    Posts
    29

    Talking

    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.

  3. #3
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Can you post the code?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Location
    Rio Rancho, NM
    Posts
    21
    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
    Joe
    Rio Rancho, NM
    Bank of America
    Telecomm Analyst
    [email protected]

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Location
    Rio Rancho, NM
    Posts
    21
    Yeah Gold is my data control for the program. It holds our database.
    Joe
    Rio Rancho, NM
    Bank of America
    Telecomm Analyst
    [email protected]

  6. #6
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    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]

  7. #7
    Lively Member
    Join Date
    Jun 2000
    Location
    Ontario, Canada.
    Posts
    85

    Question

    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
  •  



Click Here to Expand Forum to Full Width