Results 1 to 14 of 14
  1. #1
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82

    Forms and Query Tables

    Is there a command something I can issues to a query sheet to when I change tabs in my form to unfocus it? I'm having a problem where my next form is getting a new entry because my last form still has focus with the mouse in that field.

    So Example
    Main form is Location
    Tab 2 Has a subform with a table called Rooms from a Query
    Tab 3 Has a subform with a table called Grid from a Query



    What happens is lets say I last entered Living Room into the tab called Rooms it still has mouse focus, the next tab Grid will create a new entry based on that still be selected? If that makes sense. I would rather it not make blank entries. Is this doable?

    Basicly I'd like to unfocus or drop focus of the the subform and table on selection of another subform or field.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Are you talking about Tabbed Documents setting of the database? I NEVER use this. I always change to Overlapping Windows.

    I don't understand how record is created in the first tab. If you click to another tab then it should have focus.
    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
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82
    Quote Originally Posted by June7 View Post
    Are you talking about Tabbed Documents setting of the database? I NEVER use this. I always change to Overlapping Windows.

    I don't understand how record is created in the first tab. If you click to another tab then it should have focus.
    I'm using the Tab Control in my form, that's what I'm referring to, Tab 2 and Tab 3 have subforms in them that I'm referring to. What do you mean by Overlapping Windows?

  4. #4
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82
    Heres some screenshots to try to better explain.

    Tabs
    Click image for larger version. 

Name:	Tabs.jpg 
Views:	20 
Size:	110.8 KB 
ID:	15232
    Tab 1
    Click image for larger version. 

Name:	Problem1.jpg 
Views:	20 
Size:	82.0 KB 
ID:	15233
    Tab 2
    Click image for larger version. 

Name:	Problem2.jpg 
Views:	20 
Size:	88.1 KB 
ID:	15234

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    I use tab control as well. Still don't understand why you get that behavior. When I click to another tab the first control on that tab gets focus.

    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.

  6. #6
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82
    Thought I had it figured out... but I was wrong. Uploading my database file. Hope it's not to scary, I might of missed a few labels dunno. The form in question is in Location Management.

    Here is the file I have so far, thanks for the help.
    https://app.box.com/s/1xtogkpwfdxkqf3h3rz7

    Main form is Manage Location
    Location Information ---- > linked to Location Table
    Power Company ---- > linked to Location Table
    Room Management ---- > linked to a Query based off of the Room Table
    Grid Management ---- > linked to Subform I made called LocationManagementGrid

    LocationManagmentGrid has a subform inside it based on a query of the table Grid, I named this subform LocationManagementGridSubform.

    The Goal here... use the combobox inside LocationManagementGrid to filter the LocationMangementGridSubform. I want to filter the data so I only see the data based on the room selected and enter data to the room selected without affecting the other rooms.

    I hope that makes sense.
    Last edited by June7; 02-02-2014 at 11:12 PM.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Overlapping Windows - is like a normal Windows OS window. This setting is available through File > Options > Current Database > Application Options

    Something weird about the Relationships builder. Stuff off to the left I can't get to. Never seen that happen. Appears to be circular relationship which might be an issue.

    Unless you use only the intrinsic RightClick shortcut search, controls used to enter filter criteria must be UNBOUND, otherwise you change data in record. So remove the field reference in the combobox ControlSource.

    I don't see reason for the Room table in the RecordSource of ManagementLocationGridSubform, certainly not with an INNER join.

    This is a form/subform/subsubform arrangement. Main form has LocationID. Then the subform and main are linked by RoomIDFK and LocationID, which seems odd. Room and Location are synonymous? Then subform and subsubform are linked on RoomIDFK and RoomIDFK, which really doesn't make sense. Form linking should be PK to FK. The subform and subsubform have the same data source.

    I don't understand the filtering you want to do. If LocationID and RoomIDFK are synonymous, then the subform is already restricted to a particular RoomID by the Master/Child links.
    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. #8
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82
    Quote Originally Posted by June7 View Post
    Overlapping Windows - is like a normal Windows OS window. This setting is available through File > Options > Current Database > Application Options

    Something weird about the Relationships builder. Stuff off to the left I can't get to. Never seen that happen. Appears to be circular relationship which might be an issue.

    Unless you use only the intrinsic RightClick shortcut search, controls used to enter filter criteria must be UNBOUND, otherwise you change data in record. So remove the field reference in the combobox ControlSource.

    I don't see reason for the Room table in the RecordSource of ManagementLocationGridSubform, certainly not with an INNER join.

    This is a form/subform/subsubform arrangement. Main form has LocationID. Then the subform and main are linked by RoomIDFK and LocationID, which seems odd. Room and Location are synonymous? Then subform and subsubform are linked on RoomIDFK and RoomIDFK, which really doesn't make sense. Form linking should be PK to FK. The subform and subsubform have the same data source.

    I don't understand the filtering you want to do. If LocationID and RoomIDFK are synonymous, then the subform is already restricted to a particular RoomID by the Master/Child links.
    When its all said and done I want to tie a bunch of information to a single location. But at those locations there are multiple rooms and each room has a grid in it. I'm trying to set up a filter for Grid data, so if I select the room called NOC, I'm only inputing data to the Location > Room (NOC) > Grid for NOC . Does that make sense?

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    I finally got the left side of the relationship builder to show - I was trying the wrong scroll bar, oops! There is a circular relationship. Review http://www.codeproject.com/Articles/...atabase-Design

    That relationship chain makes sense. The form arrangement does not. Consider main form bound to Location. Subform bound to Room (linking LocationID to LocationIDFK). SubSubForm bound to GridLocation (linking RoomID to RoomIDFK). Apply UNBOUND room combobox filter to the middle form. The combobox RowSource can be limited to only those rooms that are associated with the Location record on the main form.

    Another alternative is to have the Room form and GridLocation form as side-by-side subforms in Datasheet or Continuous view. Review: http://www.fmsinc.com/MicrosoftAcces...edSubforms.asp
    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. #10
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82
    Quote Originally Posted by June7 View Post
    I finally got the left side of the relationship builder to show - I was trying the wrong scroll bar, oops! There is a circular relationship. Review http://www.codeproject.com/Articles/...atabase-Design

    That relationship chain makes sense. The form arrangement does not. Consider main form bound to Location. Subform bound to Room (linking LocationID to LocationIDFK). SubSubForm bound to GridLocation (linking RoomID to RoomIDFK). Apply UNBOUND room combobox filter to the middle form. The combobox RowSource can be limited to only those rooms that are associated with the Location record on the main form.

    Another alternative is to have the Room form and GridLocation form as side-by-side subforms in Datasheet or Continuous view. Review: http://www.fmsinc.com/MicrosoftAcces...edSubforms.asp
    Thank you for the help! I'll dig through this and see what I can do, I appreciate the help.

  11. #11
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82
    If you don't mind me asking, where did you see the circular relationship? Was it with the contacts/agency? area?

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Yes. Contacts, Agency, Ticket, Asset appear to be in a circular relationship.
    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. #13
    82280zx's Avatar
    82280zx is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    82
    Quote Originally Posted by June7 View Post
    Yes. Contacts, Agency, Ticket, Asset appear to be in a circular relationship.
    When I get my database put together would you mind doing a review on it for me? I'm still learning but you've been a great help! Thank you! I'll mark this one as resolved because you answered my question and enabled me to do lots of cool tricks

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Can post it, if I catch the thread I will review or maybe someone else will.
    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. Forms and Tables
    By Tiffy in forum Access
    Replies: 4
    Last Post: 02-11-2012, 03:19 PM
  2. Forms and Tables
    By Tiffy in forum Database Design
    Replies: 3
    Last Post: 02-10-2012, 05:27 PM
  3. Replies: 10
    Last Post: 07-12-2011, 11:09 PM
  4. forms and tables
    By Roberta in forum Access
    Replies: 2
    Last Post: 09-02-2010, 02:48 AM
  5. Forms and tables
    By phoenix in forum Access
    Replies: 1
    Last Post: 03-03-2010, 04:52 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