Page 1 of 4 1234 LastLast
Results 1 to 15 of 47
  1. #1
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77

    Question Help with Tracking Database Form

    I am having issues with a new database I am developing.



    The purpose is rather simple. My office receives applications in the mail. Before processing, these applications often must be sent inter-office to one of our other locations (we have several). We need a robust way to record receipt of the application initially, record the sending of it to another office, and receive it again at that office. It is essentially a tracking database that needs to record the when, why, where, and who of an internal mailing.

    I've put all the tables together and most of the queries. I've also assembled most of the relevant forms, but the master form isn't working very well. It is the Application_Frm. After adding a dealer not in the list, the record disappears.

    I also need assistance with the command buttons for tracking. I want three command buttons: send, receive, and tracking history. The send and receive command buttons will do essentially the same thing: open the Tracking_Entry_Frm with the tracking type prepopulated accordingly and the date already entered with today's date. The tracking history needs to show the full tracking history for that application.

    I'm struggling on all fronts. Assistance and suggestions on improving the database would be appreciated.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    The main form DataEntry property is set to Yes. This means it cannot display existing records, only records added in current session.

    I tested adding a new record. It remains available on the form but tabbing through last control in the TabOrder moves into a new record. If you don't want to allow that then change the form Cycle property.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77
    Well, that was a simple fix.

    Minor issue, but why does the save command button in the dealer_add_frm not close the form?

    I'm much more concerned about add the tracking send/receive functionality. I can't get the application_ID to pass to the tracking_entry_frm with the receive_commandbutton.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    There is no command in the Embedded Macro to close the form, it only saves record.

    I don't use macros, only VBA.

    I know VBA methods to pass value between forms. One is with the OpenArgs argument of DoCmd.OpenForm. Another is just to reference control on the Application_Frm. I don't know if macro can work with those.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77
    This is the VBA code I have for the receive command button now :

    Private Sub Receive_CommandButton_Click()
    DoCmd.RunCommand acCmdSaveRecord
    DoCmd.OpenForm "Tracking_Entry_Frm", acNormal, , , acFormAdd, , Me!Application_ID
    End Sub

    It is not passing the application_ID to the transaction_entry_frm

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    So you are using the OpenArgs method.

    Now code in transaction_entry_frm must extract value from OpenArgs. Try in the form Current event like:

    If IsNull(Me!Application_ID) Then Me!ApplicationID = Me.OpenArgs

    I think the code to save record will cause the application form to refresh and the record you just saved will no longer be available on the form. Let me know if I am remembering that correct.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77
    That code worked.

    In your fourt sentence, are you talking about saving the dealer_add_frm?

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    No, the code in the Receive button Click event will save the application record.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77
    Is there a way to enter a value in a field on a form you are opening with a command button?

    Ideally, I would like to select the receive command button or a send command button and simultaneously open the tracking_entry_frm and already have entered the type value. That field is set with only two options: recieve and send.


    I'm also trying to create a query that will be the record source for a subform on my master form. The current record on the master form should display in this subform any/all matching records in the tracking_tbl. I've created a subfrm and query, but it displays all tracking records. I'm guessing I have the wrong joing type.
    Attached Files Attached Files

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Can use methods already described: OpenArgs or refer to control/field on first form.

    Since there is no field indicating 'receive' or 'send' this could be passed in the OpenArgs argument then the opening form could extract.

    If you want to send multiple info with OpenArgs, concatenate the data with a separater character such as a colon (:) then code in the opening form can use string manipulation to parse the data or LIKE operator to check for values in the OpenArgs string.

    If Me.OpenArgs Like "*Receive*" Then
    Me!fieldname = "Receive"
    ElseIf Me.OpenArgs Like "*Send*" Then
    Me!fieldname = "Send"
    End If

    Which form/subform involved in the issue?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77
    Quote Originally Posted by June7 View Post
    Which form/subform involved in the issue?
    The Application_Tracking_History_Qry is the subform (I misnamed it in this your copy of the db.) It will be a subform on the Application_Frm. I know I haven't setup the query the subform is based on correctly.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Looks like the same name to me.

    No reason to include Application_tbl in the subform RecordSource. Need the Application_ID foreign key field then set Master/Child Links. Why use a query? Why not just use table as RecordSource as you did in the other subforms?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77
    Quote Originally Posted by June7 View Post
    Looks like the same name to me.

    No reason to include Application_tbl in the subform RecordSource. Need the Application_ID foreign key field then set Master/Child Links. Why use a query? Why not just use table as RecordSource as you did in the other subforms?
    That worked fine. Two fields in the subform only show the PK, Office_ID & Deputy_Clerk_ID. I've searched the properties but cannot find a way to only show other values in those tables, the text I need displayed.

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Should those two be comboboxes to select Office and Clerk from RowSource?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    KCC47 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    77
    That worked.

    I'm attempting to add a search function to my master form. At the momemt I have a unbound combobox with a record source as vehicle_junction_tbl. I've added some code that doesn't appear to work. I can find the vehicle by the VIN, but it comes up with an error after update: Compile error method or data member not found.

    Private Sub Vehicle_Search_ComboBox_AfterUpdate()
    Dim rs As DAO.Recordset
    If Not IsNull(Me.Vehicle_Search_ComboBox) Then
    'Save before move.
    If Me.Dirty Then
    Me.Dirty = False
    End If
    'Search in the clone set.
    Set rs = Me.RecordsetClone
    rs.FindFirst "[Vehicle_ID] = " & Me.cboMoveTo
    If rs.NoMatch Then
    MsgBox "Not found: filtered?"
    Else
    'Display the found record in the form.
    Me.Bookmark = rs.Bookmark
    End If
    Set rs = Nothing
    End If
    End Sub

Page 1 of 4 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Material Tracking Database
    By bong in forum Programming
    Replies: 2
    Last Post: 08-19-2012, 07:54 PM
  2. Database for test progress tracking
    By Ricardo in forum Database Design
    Replies: 3
    Last Post: 06-07-2012, 07:20 AM
  3. Help With Patient Tracking Database Design
    By wkenddad in forum Programming
    Replies: 2
    Last Post: 04-25-2012, 09:15 PM
  4. Asset Tracking Database
    By wgroenewald in forum Access
    Replies: 3
    Last Post: 02-13-2012, 08:26 PM
  5. help with tracking within a database
    By martyn in forum Queries
    Replies: 0
    Last Post: 10-07-2009, 02:15 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