Results 1 to 11 of 11
  1. #1
    ceatana is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    22

    Form not showing up

    Good morning.

    I'm fairly new to creating stuff in Access. The other day, I spent a lot of time designing a form in Access 2010. Planning to continue and finish today, I opened up the database, opened up the form...and it was blank. The title was there. The background colours were there. But none of the fields were showing in form view. I switched to design view, and all the fields and combo boxes are showing in design view, but as soon as I switch to form view, there is nothing there. Any idea why this might be? And how to not have it happen?



    Thanks!

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Look at the record source.
    Almost certainly it will be empty.
    Probable reason will be inner joins where one or more tables have no data
    Modify record source as necessary
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    ceatana is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    22
    Why would the table having data determine if a field in a form shows up?

    This is what the form looks like in Form View:
    Click image for larger version. 

Name:	Empty form.PNG 
Views:	19 
Size:	15.4 KB 
ID:	33003

    And this is what is looks like in Design View:
    Click image for larger version. 

Name:	Design view.PNG 
Views:	19 
Size:	51.1 KB 
ID:	33004

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    The form & design views don't help find an answer.

    Need to look at your record source and see if it shows any records.
    Are you using a single table or a query? If a query does it have inner joins or outer joins?

    If the record source has no records, you would get a blank form
    However I would have expected the date & time fields in the header to still show something

    Are your controls set to be VISIBLE in form view?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    ceatana is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    22
    I'm using a table for my record source. Even after I add a record to test it, it doesn't show anything.

    I still don't understand why having records in the table would affect whether a field and it's label show up in a form. I understand that the fields would show up blank, but shouldn't they at least be there?

    Everything is set to be visible in form view.

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Want to post a zip copy of the database ---if so remove anything personal first.
    You can use names like Porky Pig, Donald Duck to anonymize things.

    You could post a jpg of the form's recordsource as Colin suggests.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Quote Originally Posted by ceatana View Post
    I'm using a table for my record source. Even after I add a record to test it, it doesn't show anything.

    I still don't understand why having records in the table would affect whether a field and it's label show up in a form. I understand that the fields would show up blank, but shouldn't they at least be there?

    Everything is set to be visible in form view.
    I assumed 2 things:
    a) you were using a query based on several tables and using inner joins
    b) you were opening the form filtered to a record which 'didn't exist' because there was no record in one of the tables

    In such cases, from personal experience, you can indeed see a blank form

    However as you are using a table, that's no longer relevant
    I'm not sure whether you are opening the form filtered as the navigation controls aren't visible
    Your table now contains data

    So, possibilities include:
    1. Form controls are all set to be hidden (visible = false) - check in the property sheet in form design view
    2. The form is corrupted - if so, make a new copy of the form

    As Orange has already suggested, upload a copy of your database as at the moment, all we can do is make 'intelligent' guesses (or not ....!)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    ceatana is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    22
    I think I zipped this correctly...


    Membership test.zip

  9. #9
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    This is the recordsource of the form
    (after formatting)
    Code:
    SELECT [MEM-MemberWorkInfo].LName
        ,[MEM-MemberWorkInfo].FName
        ,[MEM-MemberWorkInfo].STATUS
        ,[MEM-MemberWorkInfo].IAN
        ,[MEM-MemberWorkInfo].INS
        ,[MEM-MemberWorkInfo].UnionHst
        ,[MEM-MemberWorkInfo].COSHHst
        ,[MEM-MemberWorkInfo].PLNum
        ,[MEM-MemberWorkInfo].Grp
        ,[MEM-MemberWorkInfo].WkPROV
        ,[MEM-MemberWorkInfo].LEVEL
        ,[MEM-MemberWorkInfo].[Term/Cont]
        ,[MEM-MemberWorkInfo].LANGUAGE
        ,[MEM-MemberWorkInfo].Room
        ,[MEM-MemberWorkInfo].EmpDate
        ,[MEM-MemberWorkInfo].WkEmail
        ,[MEM-MemberWorkInfo].WkPhone
        ,[MEM-MemberWorkInfo].Gender
        ,[MEM-MemberWorkInfo].SOSEffDate
        ,[MEM-MemberWorkInfo].PreSOSStat
        ,[MEM-MemberWorkInfo].[EX/LWOP]
        ,[MEM-MemberWorkInfo].Notes
        ,[MEM-MemPersInfo].LName AS [LName_MEM-MemPersInfo]
        ,[MEM-MemPersInfo].Street
    FROM [MEM-MemPersInfo]
    INNER JOIN [MEM-MemberWorkInfo]
        ON ([MEM-MemPersInfo].FName = [MEM-MemberWorkInfo].FName)
            AND ([MEM-MemPersInfo].LName = [MEM-MemberWorkInfo].LName);
    When I run it, it shows no result set.

    There are no records in Mem-PersInfo.
    There are 3 records in Mem-MemberWorkInfo

    MemNum LName FName Status IAN
    2016-458 Ernst Laurette RA AS678
    2018-115 Till Shelagh NE AS123
    2018-154 Smith Joe ME AS345

    I'm not sure why Date and Time do not show???

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    You are doing an INNER join on tables. This requires related records in BOTH tables for data to show. Why do you include Mem-MemPersInfo when no fields from that table are needed? And why are you joining on LName and FName fields when MemNum fields are defined as PK/FK in relationship builder? Remove that table from the form RecordSource.


    You have a search combobox bound to the LName field from that table. Controls used to enter search criteria should be UNBOUND, otherwise you change the value in record.


    Should not be using names as PK/FK. Names make very poor unique identifiers. It is possible for multiple persons to have same names. And it gets worse - you have a compound PK/FK using LName,FName,DOB between INS-INSCOP and Mem-MemPersInfo.

    MemNum is designated as primary key in multiple tables. This creates a 1-to-1 relationship. Probably can merge several to 1 table.


    Advise not to use spaces nor punctuation/special characters (underscore only exception) in naming convention. Underscore would be better than hyphen.
    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
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    My original explanation was correct.
    Your form record source is made from 2 tables with an inner join (actually 2 inner joins)

    Click image for larger version. 

Name:	FormRecordSource1.PNG 
Views:	13 
Size:	20.5 KB 
ID:	33017

    One of those tables is empty so the form record source is also empty
    Because you haven't used the common PK field for your join, the form is blank

    I altered your join to use the PK fields & the form now shows all the controls - obviously empty as there is no data

    Click image for larger version. 

Name:	FormRecordSourceNEW.PNG 
Views:	11 
Size:	20.6 KB 
ID:	33018

    Click image for larger version. 

Name:	FormView.PNG 
Views:	12 
Size:	34.2 KB 
ID:	33019

    I've added 3 records to the empty table and the form is now showing data as you would expect

    Next I looked at your relationships window & found lots of issues

    Click image for larger version. 

Name:	Relastionships.PNG 
Views:	13 
Size:	89.7 KB 
ID:	33020

    I've changed the link between MEM-MEMPersInfo & INS-INSCOP to use the PK field

    You have duplicated lots of fields in several tables (highlighted in yellow).
    NEVER do that - data is saved in ONE place only
    REMOVE LName & FName from all except the MemPersInfo table

    Similarly, remove BldgName from MemberWorkInfo table - BldgNum is already there acting as a FK field - that's all you need

    Next error - do NOT use calculated fields such as AGEMAY1 - it will go out of date
    Calculate age using a query

    MEM-Dues table - replace all JAN - DEC fields with one field to indicate the month fees are due

    MEmPersInfo table - recommend strongly that you do NOT use multivalue fields as they will cause you lots of issues later on
    Remove those 3 items into a separate table MemCard

    2 tables aren't linked to anything else - MEM-Categories & MEM-ProvinceLookup - are they needed?

    2 tables only have a PK field and one other field - these may be superfluous - MEM-ProvinceLookup & MEM-StatusLookup

    Finally, I recommend you do not use hyphens or spaces in table names
    INS-INSCOP is bad ; INSCOP is fine
    MEM-MemPersInfo is bad ; MemPersInfo is fine

    Modified database attached

    EDIT : Whilst I was creating this lengthy reply, June has made many of the same points!
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 9
    Last Post: 08-08-2016, 02:57 PM
  2. Replies: 4
    Last Post: 06-23-2016, 01:10 PM
  3. Replies: 2
    Last Post: 03-08-2015, 01:47 PM
  4. Replies: 15
    Last Post: 04-16-2014, 01:15 PM
  5. Replies: 6
    Last Post: 04-02-2014, 11:35 AM

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