Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Thanks for the file, sorry to bother you.
    Well, how do I display the text box all comments (dated, I did as you said, created date field and set the properties as you directed me) a related step, when it is selected. It is possible with the DLookup () function or ELookup ().



    Again, thank you.

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You want to show all the records from tblComentarios that are related to a step? A textbox cannot do that, nor will a listbox work. Need to do another subform, similar to frmaudTblPassosStatusA.
    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. #18
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Thanks, I'll try.

  4. #19
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    I'll try as you advised me!

  5. #20
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    June7,
    You think you can, Add in subform (child, which shows the history) of the comments popup form? (Draft attached)
    I tried some combinations but did not work.
    Thank you.

  6. #21
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    forgot the draft

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Do not know what you need. Cannot do anything with an image of an Excel spreadsheet. Did you build a form and write code? Why does not work?
    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.

  8. #23
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    I'll try to explain better.
    I'm trying to create a sub child, with a consultation between tables. To show history and dates rescheduled these dates and comments.

    Attached file, perhaps best explains.
    Thank you.

  9. #24
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    The query ConsultaComentáriosAuditoria needs a join clause. Joining on CodPassosStatus and DataHora fields should work:
    SELECT TblComentários.CodComentários, TblComentários.Comentários, TblComentários.CodPassosStatus, audTblPassosStatusA.audID, audTblPassosStatusA.audType, audTblPassosStatusA.DataHora, audTblPassosStatusA.CodPassosStatus, audTblPassosStatusA.Passo, audTblPassosStatusA.DataReprogramada
    FROM audTblPassosStatusA INNER JOIN TblComentários ON (audTblPassosStatusA.DataHora = TblComentários.DataHora) AND (audTblPassosStatusA.CodPassosStatus = TblComentários.CodPassosStatus);

    Unfortunately, when I try, no records return. Problem is one DataHora has time and the other does not. These two tables should have a one-to-one relationship. Alternative is to put the comment field in audTblPassosStatusA.

    There are two CodPassosStatus fields in the query ConsultaComentáriosAuditoria. Child Link for subaudTblPassosStatusA needs to specify the field from TblComentarios, like TblCommentarios.CodPassosStatus.
    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.

  10. #25
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Thanks for responding.
    I find it best to follow your second suggestion. I created a field in the table TblPassosStatus comments, and also added the two audit tables. I put the comments field in the sub child. I created the popup form. I repeated the same code that had worked in the bank. But the form is not opening popup when I upgrade the rescheduled date field. You see the following error message:
    Run-time error '3008 ':
    Table 'TblPassosStatus' was opened exclusively by another user, or opened
    through the user interface and can not be mamipulada programmatically.
    Thank you.

  11. #26
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    June7, You said the problem was a DateTime field, with an hour and some not. Now I put the comments field as default value Now (). That is, the two tables are left with the same data type. But still did not work.
    In bd, think before I have to make new audit tables for the comments popup form.
    What do you think?
    Thank you.

  12. #27
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Now() records date/time to the second. The date/time in the two fields cannot be relied on to be exactly the same. A one second difference and the link is lost. Depending on date/time as key is bad. This is why you need the audit record ID in the comment table or include the comment field in the audit table.
    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. #28
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    I tried different now. I made comments back to the table, two tables and did the audit. In the event after updating the feedback form popup, called the audit function. Create a form with the help of the wizard, with fields of audit table TblPassosStatus and also with the audit table TblComentários.
    It's strange, in the third step of the only registered product, you can view the history of the subform dates and also comments. Also, the popup form opens and functions normally. But when I post a new comment in another step, the following error message:

    Run-time error '3008 ':
    Table 'TblPassosStatus' Exclusively was opened by another user, or opened
    through the user interface and programmatically mamipulada Can not be.
    Why is this happening?
    I erased all records, and put new ones. It continues with the same problem.
    Thank you.

  14. #29
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I don't understand relationships for the comment tables. The RecordSource for formaudComentáriosaudPassos shows audComentarios linked to TblComentarios. Should audComentarios link to audTblPassosStatusA?

    I think trying to synchronize these subforms as Datasheet view is going to keep causing problems. Saving audit records is triggered by Form AfterUpdate event. This happens when you leave that record. Unfortunately, leaving that record means it is no longer the current record and the audit records displayed are then for the record just moved to. This is why form/subform arrangements are intended to be in Single/Datasheet views, with subform placed within the main form, not next to it. You are venturing into a design I would strenuously resist building. I am extremely reluctant to continue even trying to help. Between the language barrier and unconventional design, I am quite lost as to how to proceed.
    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. #30
    fabiobarreto10 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    169
    The relationship table TblPassosStatus is a step for many comments.

    What is the record source that I have to ask?

    I just need to put in the history of the subform rescheduled dates and comments.

    How would you solve this problem?

    Please help me.

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2003 Calender Sub Form and PopUp
    By pkstormy in forum Code Repository
    Replies: 1
    Last Post: 07-29-2012, 10:50 AM
  2. Popup form
    By triplee23 in forum Forms
    Replies: 1
    Last Post: 10-24-2010, 04:09 PM
  3. Popup Form
    By NISMOJim in forum Forms
    Replies: 1
    Last Post: 10-23-2010, 09:16 AM
  4. popup when opening a form
    By ajetrumpet in forum Forms
    Replies: 1
    Last Post: 10-08-2010, 09:33 AM
  5. Form-Subform-Popup Problem
    By TrudyD1474 in forum Forms
    Replies: 1
    Last Post: 06-10-2010, 05:36 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