Results 1 to 10 of 10
  1. #1
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30

    Fields displaying when not supposed to

    Hi,



    I have a form where I have about 15 sets of fields (date, time, comments, etc.). So every time someone adds a record to those fields, saves and comes back in an extra blank set of fields appear. So, my concern is that whenever I go back in there are fields that are empty and visible because in one of the records I'm currently using that field.

    I believe it's because of how I created the event. Currently I have it as Form_Current. I have tried:
    _Open (procudes error)
    _Load
    _AfterUpdate
    _BeforeUpdate

    I really didn't want to do an AfterUpdate for each field because that's quite time consuming.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by '15 sets of fields'? Do you mean 15 records?

    Form is in Continuous or Datasheet view? Can't use VBA code to set visibility of controls. Setting the property affects all instances of control because there is only one control for each field in the form design. The controls replicate for each record but still only one control for each field.

    Can use Conditional Formating to set Enabled property of textbox.
    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
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30
    Untitled.zip

    Here is what it looks like. I think from this you can see what I mean by sets (Agent Name, Date, Time, LM, Comments).

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Your attachment won't open; it is reported to be damaged. But to be honest, images seldom help us help anyone. You really need to zip up your Access file (remove confidential data, if any) and attach it so we can really look at it.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30
    MikDB.zip

    Okay. Here is my DB.

    The form I'm having the problem with is GuestT. Thanks!
    Attached Files Attached Files

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    This time your zipped file yields a file named, simply, MikDb. It has no file extension, it cannot be opened. I even tried adding an extension of mdb and accdb; Access attempts to open it then reports 'file format not recognized.'
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30
    LatestDB.zip

    Okay try this one. It has an extension and I zipped it once more using Windows 7. I have 2 OSes and I used Mac to zip it last time. Most likely it should work this time. I also checked the file type and says Access database and had accdb.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This is not a relational database structure. There is only one big flat file table. This structure will cause you problems in the future. What if you wanted to search for all the records Agent X is associated with, would have to search through about 15 fields because the agent could be in any of them.

    You need a better understanding of relational database principles.
    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
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30
    I know. I had it structured in multiple tables before but I got a bunch of errors on this form. This was the only way to solve it.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What you need is a child table to associate agents with the primary (master or parent) record. Then use form/subform for data entry/edit.

    tblAgentsAssigned
    PrimaryID
    AgentID
    DateAssigned
    etc.

    This table will have as many records as needed to associate agents with primary record. Multiple records for each primary.
    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.

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

Similar Threads

  1. Replies: 6
    Last Post: 07-10-2013, 07:39 AM
  2. Only displaying non-null fields in query??
    By skier4life in forum Queries
    Replies: 1
    Last Post: 06-24-2013, 08:53 AM
  3. Replies: 0
    Last Post: 02-24-2010, 10:49 AM
  4. Displaying form fields
    By sakthivels in forum Forms
    Replies: 5
    Last Post: 05-25-2009, 07:52 AM
  5. form not displaying fields
    By ashiers in forum Forms
    Replies: 0
    Last Post: 09-19-2008, 07:02 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