Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006
    Posts
    2

    My subform doesnt refresh????? HELP!

    Hey guys how are you going?
    I am in some desperate need of help, I have been working on this database for far too long and it is starting to kill me!

    The problem in which I am encountering at the moment is I have a main form (called frmDataEntry) it contains a sub form (called frmImageFileSummaryList), anyway the names of these files are irrelevant, the problem is as follows:

    The subform is a continous form in which the user clicks an add record button that opens a get file function. The user then selects a pdf file for example which then opens another form that contains an embedded link to the pdf and also a short name and description section to accompany this link. Once filled out the user then clicks the save record button and it is meant to save the record and return to the main form. It is saving the record and returning to the main form, however, the subform is not immediately showing the saved record, it will show, however I have to goto the next record and then once I return to the previous record the subform is showing the file/ link.

    Each record is obviously going to contain different files within the subform pretaining to that particular record, hence I have created a relationship and Master/Child field links. I need the subform to immediately refresh or exhibit the saved records when it returns to the main form (frmDataEntry).

    My On Click Event procedure code is as follows:

    Private Sub cmdSave_Click()
    ' Purpose : Save the Record
    ' Parameters : None

    On Error GoTo Err_cmdSave_Click
    'If Validated, Save; if not, just return to Form
    Me![txtImagePathAndFile] = Me![imgTheImage].Picture
    If Validate Then
    DoCmd.RunCommand acCmdSaveRecord
    DoCmd.Echo False
    Me.RecordSource = Me.RecordSource
    DoCmd.Echo True
    DoCmd.Close acForm, Me.Name
    End If
    Exit_cmdSave_Click:
    On Error Resume Next
    Exit Sub
    Err_cmdSave_Click:
    MsgBox "Error " & Err.Number & " : " & Err.Description & " in cmdSave_Click", vbExclamation, "Database Error"
    Resume Exit_cmdSave_Click
    End Sub

    Your thoughts and help would be greatly appreciated.

    Regards,


    Liam

  2. #2
    Join Date
    Mar 2006
    Posts
    2

    Fixed it!

    Hey,

    I finally figured it out, very very simple, undoubtably I will have another stupid question to ask shortly, but I'll just have to stop and think for a few minutes before I bother posting a page question, its always the simplest things that we tend to quite often easily overlook!

    Regards,
    Liam.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. refresh datasheet as text changes
    By mkhan in forum Forms
    Replies: 0
    Last Post: 09-06-2008, 07:46 AM
  2. Replies: 2
    Last Post: 01-14-2008, 12:15 PM
  3. Refresh form search text box
    By oxicottin in forum Forms
    Replies: 2
    Last Post: 11-19-2007, 02:28 PM
  4. Replies: 1
    Last Post: 12-10-2005, 04:52 PM
  5. Subform in a Subform and relationships
    By St3ph3n in forum Database Design
    Replies: 3
    Last Post: 12-06-2005, 06:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums