Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936

    Those are the Access wizards, evidently. I got your forms to work by - create a new database, import all objects and only the forms for MemCompSF. That form worked fine. So the problem lies in one of the other forms. You can import them one by one and see which one(s) gives the error. I had to change your OnCurrent code to use a different field name, not sure where Zoombox resides on the subform, or if it does - ?

  2. #17
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Hi Aytee,
    This new db - database6.accdb - seems to work, I added your code as I understood it to OnCurrent event of MempComplaintSubFrm and the textbox to the main form, but I'm getting a vb code error saying it can't find the textbox - what I want to do is zoom all the fields in the current record together.
    If possible could you take another look at the attached database, see if it works and let me know why my code isn't working.
    To see the form in action you need to select a species from MEMP Species dropdown list in the header of the main form MempCompSF.

    Thanks
    David
    Attached Files Attached Files
    Last edited by mdavid; 10-27-2017 at 03:12 PM. Reason: added how to activate frm

  3. #18
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    That was the change I had made to the original database to get it to work properly. When you reference objects on forms they have to exist! You have textbox on the main form which you are referencing correctly. However, the field Zoombox does not exist (Me!Zoombox) on the subform. If you want to zoom all the fields then you must reference them one at a time and there must be a one-to-one match. I changed your code to read : Forms!MempCompSF!Zoombox=Me!Complaint. You must do this for each of the fields that you wish to display.

    How many fields are you wanting to show? Your form is really full of data, you may find you run into a design issue. BTW, for all your forms set the property Record Selectors to No and also Navigation Buttons to No.

  4. #19
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Thanks Aytee, that works great - I got all the fields in the one zoombox:

    Code:
    Private Sub Form_Current()
    Forms!MempCompSF!Zoombox = "Complaint: " & Me!Complaint & Chr(13) & Chr(10) _
                            & "Preparation: " & Me!Preparation & Chr(13) & Chr(10) _
                            & "Administration: " & Me!Administration
    End Sub
    Would it be possible to display the text box as a popup box so the text only appears when the record's clicked?

    Thanks
    David

  5. #20
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    As opposed to when? Isn't that how it is working right now? But sure, you can show it in a MsgBox, or you can make a popup form, or ... The ID of the current record is available to you in the code above, use it how you wish.

  6. #21
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Thanks for all your help.
    I'll mark this as solved.
    David

  7. #22
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Hi Aytee,

    I was wondering why you say:

    " BTW, for all your forms set the property Record Selectors to No and also Navigation Buttons to No."

  8. #23
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You don't need them and they detract from the form's looks, imo. You want to keep the forms as clean and simple as you can, and with this form you have loads of stuff going on, so removing unneeded bits and pieces will help. Also, from a developer's perspective, you have to make sure that if the user navigates thru the recordset that you are prepared for it and have got all your processes geared up for it.

  9. #24
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Yes you're right - KISS
    Thanks for a professional perspective - that's what I'm missing

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

Similar Threads

  1. Replies: 16
    Last Post: 06-29-2017, 04:54 PM
  2. Continuous form to show Unique records
    By stewegg in forum Forms
    Replies: 7
    Last Post: 03-19-2017, 05:17 AM
  3. Replies: 2
    Last Post: 06-14-2016, 03:01 PM
  4. Replies: 2
    Last Post: 02-28-2013, 07:29 AM
  5. Replies: 6
    Last Post: 08-30-2012, 06:23 PM

Tags for this Thread

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