Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234

    Column headings remaining visible

    I'm not 100% sure how to describe the issue, so I'll let the pictures speak for themselves. In the 3 pictures, are the Client information, Vendor information, and Government entity information. The column headers of "Event#," "Date," "Event Nature," and "Event Address" all are visible only when looking at Client information, and do not show when looking at Vendor information or Gov't entity information. However, "Cars Expected" and "Cars Parked" is still visible. The settings are all the same, but I can't get them to only show when Client info is up.



    Picture 1, Client; Picture 2, Vendor; Picture 3, Gov't

    Click image for larger version. 

Name:	Client.png 
Views:	11 
Size:	44.5 KB 
ID:	21467 Click image for larger version. 

Name:	Vendor.png 
Views:	12 
Size:	51.9 KB 
ID:	21468 Click image for larger version. 

Name:	Gov't.png 
Views:	12 
Size:	48.3 KB 
ID:	21469

    Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Would have to review form design. If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    Here it is. It's barely functional, but based on previous threads where I uploaded it, it should work.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Which is the main form (or the subforms) involved in 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.

  5. #5
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    frmClient. When you look at it in design mode, you'll see 3 different subforms that sit in the same place down near the bottom of the form. Which is visible is determined by which type of client.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    There is duplicate keyboard shortcut for Save and Edit Station buttons.

    I see 3 forms: fsubRelContactEntity, fsubRelPymtSchedDistrictSta, fsubRelLotClient. The first is at top and other 2 at bottom.

    You want the labels above the listbox to be not visible when the listbox is not visible? Suggest you give the Cars Expected and Cars Parked better names and include them in the code, just as you have for the other labels such lblEventAddress.

    What process should I use to open frmClient without error? Directly from navigation pane triggers error.

    I get an error opening db - can't find MSCAL.ocx. Are you using calendar control somewhere?
    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
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I'm not using calendar control that I'm aware of, and I'm not sure why you're getting an error when tring to open frmClient form the nav pane. Have you tried opening it from the switchboard?

    I inherited this database, so I had no hand in building it.

    I can name cars parked and cars expected as, say lblParked and lblExpected, but I am not sure where to include them in the code. When I look at the code for the form, I see the commands that tell the various labels to be visible or not, but where to stick these, I'm not sure.

    Private Sub cboSelIndustry_AfterUpdate()
    If Me.cboSelIndustry = 44 Then
    Me.lblEventNum.Visible = False
    Me.lblEventDate.Visible = False
    Me.lblEventNature.Visible = False
    Me.lblEventAddress.Visible = False
    Me.lboEvent.Visible = False
    Me.lblPymtSched.Visible = False
    Me.lblDistrictSta.Visible = False
    Me.cboSelDistrictSta.Visible = False
    Me.lkupCheckPayableTo.Visible = False
    Me.chldFsubRelPymtSchedDistrictSta.Visible = False
    Me.cmdStation.Visible = False
    Me.lblParkingLots.Visible = True
    Me.chldFsubRelLotClient.Visible = True
    ElseIf Me.cboSelIndustry = 48 Then
    Me.lblEventNum.Visible = False
    Me.lblEventDate.Visible = False
    Me.lblEventNature.Visible = False
    Me.lblEventAddress.Visible = False
    Me.lboEvent.Visible = False
    Me.lblParkingLots.Visible = False
    Me.lblReferral.Visible = False
    Me.cboSelRefBy.Visible = False
    Me.cboSelReference.Visible = False
    Me.txtReference.Visible = False
    Me.chldfsubRelContactEntity!cboSelRank.Visible = True
    Me.lblDistrictSta.Visible = True
    Me.cboSelDistrictSta.Visible = True
    Me.lkupCheckPayableTo.Visible = True
    Me.cmdStation.Visible = True
    Me.lblPymtSched.Visible = True
    Me.chldFsubRelPymtSchedDistrictSta.Visible = True
    Else
    Me.lblEventNum.Visible = True
    Me.lblEventDate.Visible = True
    Me.lblEventNature.Visible = True
    Me.lblEventAddress.Visible = True
    Me.lboEvent.Visible = True
    Me.cboSelRefBy.Visible = True
    Me.lblReferral.Visible = True
    Me.lblDistrictSta.Visible = False
    Me.cboSelDistrictSta.Visible = False
    Me.lkupCheckPayableTo.Visible = False
    Me.lblPymtSched.Visible = False
    Me.lblParkingLots.Visible = False
    Me.chldFsubRelLotClient.Visible = False
    Me.chldFsubRelPymtSchedDistrictSta.Visible = False
    Me.cmdStation.Visible = False
    End If
    End Sub

  8. #8
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    Ok, I named them as I said above, and I changed the code to read this:
    Private Sub cboSelIndustry_AfterUpdate()
    If Me.cboSelIndustry = 44 Then
    Me.lblEventNum.Visible = False
    Me.lblEventDate.Visible = False
    Me.lblEventNature.Visible = False
    Me.lblEventAddress.Visible = False
    Me.lboEvent.Visible = False
    Me.lblExpected.Visible = False
    Me.lblParked.Visible = False
    Me.lblPymtSched.Visible = False
    Me.lblDistrictSta.Visible = False
    Me.cboSelDistrictSta.Visible = False
    Me.lkupCheckPayableTo.Visible = False
    Me.chldFsubRelPymtSchedDistrictSta.Visible = False
    Me.cmdStation.Visible = False
    Me.lblParkingLots.Visible = True
    Me.chldFsubRelLotClient.Visible = True
    ElseIf Me.cboSelIndustry = 48 Then
    Me.lblEventNum.Visible = False
    Me.lblEventDate.Visible = False
    Me.lblEventNature.Visible = False
    Me.lblEventAddress.Visible = False
    Me.lboEvent.Visible = False
    Me.lblExpected.Visible = False
    Me.lblParked.Visible = False
    Me.lblParkingLots.Visible = False
    Me.lblReferral.Visible = False
    Me.cboSelRefBy.Visible = False
    Me.cboSelReference.Visible = False
    Me.txtReference.Visible = False
    Me.chldfsubRelContactEntity!cboSelRank.Visible = True
    Me.lblDistrictSta.Visible = True
    Me.cboSelDistrictSta.Visible = True
    Me.lkupCheckPayableTo.Visible = True
    Me.cmdStation.Visible = True
    Me.lblPymtSched.Visible = True
    Me.chldFsubRelPymtSchedDistrictSta.Visible = True
    Else
    Me.lblEventNum.Visible = True
    Me.lblEventDate.Visible = True
    Me.lblEventNature.Visible = True
    Me.lblEventAddress.Visible = True
    Me.lboEvent.Visible = True
    Me.lblExpected.Visible = True
    Me.lblParked.Visible = True
    Me.cboSelRefBy.Visible = True
    Me.lblReferral.Visible = True
    Me.lblDistrictSta.Visible = False
    Me.cboSelDistrictSta.Visible = False
    Me.lkupCheckPayableTo.Visible = False
    Me.lblPymtSched.Visible = False
    Me.lblParkingLots.Visible = False
    Me.chldFsubRelLotClient.Visible = False
    Me.chldFsubRelPymtSchedDistrictSta.Visible = False
    Me.cmdStation.Visible = False
    End If
    End Sub

    However, Cars Parked and Cars Expected are still visible no matter which industry is selected.

  9. #9
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    Here, try this FE. It may work better.
    Attached Files Attached Files

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Still get error opening form:

    Compile error in query expression 'IIf(Not(IsNull([EntityName])) And IsNull([ClientName]),-1,[PrimaryContact]'.

    Opening the form RecordSource query triggers error:

    California Parking Valet Database can't represent the join expression tblClient.ClientID = qryContact.EntityID in Design view.
    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
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I'm not sure I can fix that one. I had to delete all of the sensitive information, and the client table, though left in place, by necessity was thoroughly gutted.

    I'll work on it and get back to you.

    Stupid question, did you delete all the tables and re-link them to the BE I sent?

  12. #12
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I deleted all the tables, then linked the tables to the stripped down BE, and didn't get any error messages when opening up the client form.

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I did the relinking of course but did not delete the links, just relinked from Link Manager. All but one table (tblEmployee_bu) were found and linked. Tables open just fine, at least the ones I hit on.

    I tried opening qryClient in datasheet view from navigation pane and get the compile error.

    I tried opening qryClient In design view from navigation pane and get the error about join expression.

    EDIT: Apparently not all tables relinked - but only tblEMployee_bu triggered error. So this time did delete all and set new links. Weird. Still get the same errors. Plus a new one when I try to close or open db: Invalid operation. I give up.

    However, the new posted db still shows labels have same names as before (Label165 and Label166). These are not the names showing in your posted code. Code in db does not show these changes.
    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.

  14. #14
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I'm still stumped on this one. The settings are all identical across the board, and the code has been written to mirror the other column headers that are either visible or not depending on the contact type, and am not getting positive results.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Since I cannot open your form, cannot debug.

    Have you step debugged?
    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.

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

Similar Threads

  1. Variable Column Headings
    By asparks16 in forum Queries
    Replies: 1
    Last Post: 06-28-2012, 07:58 PM
  2. Replies: 8
    Last Post: 05-14-2012, 09:49 AM
  3. csv import second row contains column headings
    By dr_patso in forum Import/Export Data
    Replies: 1
    Last Post: 07-16-2011, 03:56 PM
  4. Resizing column headings
    By allykid in forum Access
    Replies: 0
    Last Post: 03-10-2011, 12:58 PM
  5. Cross Tab Column Headings...
    By mhoctober in forum Queries
    Replies: 3
    Last Post: 09-10-2010, 01:21 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