Results 1 to 12 of 12
  1. #1
    linco is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Surrey, BC
    Posts
    7

    Question Dialog form to call up datasheet form in a Navigation form?

    In my Dogshow tracking program, I would like to have a Dialog box/form that would then call up a datasheet form to enter records. And, I want to have this within my Navigation form.



    So, I would like to click on a tab on my Navigation form and have it open a form that would ask the name of the Dog, and the Division entered.

    Based on that info, I would like it to call up a Datasheet form just for that dog and the entries they already have in that Division.

    How would I go about that?

    thanks!!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    since I dont know all the ins and outs of the dog division table , i am guessing.

    you need a tDog table
    tOwner table
    tDivision table

    tDivision would have fields;
    DivID
    DivisionName
    Date

    and a combined division and dog data, tDogDivs
    DivID
    DogID
    results

    Datasheet may not the way to enter data, but you can.
    tDogDivs table would hold the data you ask.
    the division entered, the dog and his results.

    Better would be a parent/child form. User picks the dog ,pulls up the form, enters data in the subform of all that 1 dog's history.

  3. #3
    linco is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Surrey, BC
    Posts
    7
    I have done a fair amount of database programming in SQL and R:Base but I am just learning Access so I can follow the theory but I can't see how to make it work within the Access framework.

    I think I am almost there - but not quite. I do have the tables that you mentioned and I created the following form but it does not do quite what Iintended .

    I was hoping that the User could:
    -enter the dog and Division in the upper area.
    -In the lower area, I wanted it to show all the records that matched that dog and that Division. Each dog needs to get 3 legs in the Division to get a Title and move on to the next Division, so the person inputting needs to know how many legs they have received so far to determine if they have a Title.

    My original thought was that the Upper area would be where they entered the current data and the lower area would just be for showing what had already been entered in the table.


    So, is there a better way to approach the problem or a way to revamp my form to work better??




    Click image for larger version. 

Name:	Input Form.jpg 
Views:	17 
Size:	87.4 KB 
ID:	26965

    thanks for any help provided!

    Lin

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You are using a split form. I've never used a split form - I consider it another questionable idea by MS.

    I would suggest/recommend using a main form/sub form design.

  5. #5
    linco is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Surrey, BC
    Posts
    7
    Still bashing my head against the wall on this one!

    I have come to the conclusion that all I truly need is to know what leg the dog has achieved in that division before entering the current leg.

    I am trying to add a combo box to do that. I created a Query and am trying to use that Query to populate my Combo box. It insists on giving me the ID number of the Division rather than the text name in the Combo box even though the Text name is in the Query. So, what am I missing?

    Query: SELECT [MF_Event Results Query].[DogID], [MF_Event Results Query].[Max Of Leg?], [MF_Event Results Query].[Division] FROM [MF_Event Results Query] ORDER BY [DogID], [Division], [Max Of Leg?];

    Click image for larger version. 

Name:	Query Builder.jpg 
Views:	13 
Size:	87.4 KB 
ID:	27009

    Click image for larger version. 

Name:	Query Result.jpg 
Views:	13 
Size:	27.8 KB 
ID:	27010

    Click image for larger version. 

Name:	Query in Form.jpg 
Views:	13 
Size:	29.9 KB 
ID:	27011

    Lin

  6. #6
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I created a Query and am trying to use that Query to populate my Combo box. It insists on giving me the ID number of the Division rather than the text name in the Combo box even though the Text name is in the Query.
    Lets say the query is "SELECT ID, DogName FROM tblDogs;".
    To save the "ID" to the bound field and display the dog name in the combo box, you set:
    Bound field = 1 (data tab)
    Column count = 2
    (format tab)
    Column widths = 0
    (format tab) (you could use Column widths = 0, 1.35 ....... this would set the dog name column to 1.35 inches wide)



    Here is a PDF about setting up a combo box:
    https://fisher.osu.edu/~muhanna.1/83...ials/combo.pdf



    You could post your dB for analysis.......

  7. #7
    linco is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Surrey, BC
    Posts
    7

    Angry Issue with Combo Box on a Form

    Quote Originally Posted by ssanfu View Post



    You could post your dB for analysis.......
    I think this is what I need to do. From everything that I read through in your answer, I am doing it right, but I have to be missing something!


    --------------------------
    So, here goes:

    My issue is with the Form: Enter Freestyle Results. In the Combo Box for leg?, I want the user to be able to see what # of legs has already been entered for that dog, in that Division.
    I want to see the Division description, not the ID# in the Combo box. (the way it is set up in the Query)
    The field that should fill in is the 'Max of Legs' and the User needs to be allowed to change that.

    Essentially, I am using the Query and the Combo Box to give the User information about previous entries in the table. They need this info in order to fill in the correct # of the leg at this time. (i.e. in most cases, 3 legs are needed in order to get a Title and progress to the next Division). Maybe there is a better way to accomplish this?


    https://dl.dropboxusercontent.com/u/...ws2Dance.accdb

    Any help would be gratefully accepted! I am at my wits end with this!

    Lin

  8. #8
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I want the user to be able to see what # of legs has already been entered for that dog, in that Division.
    You do not have any criteria to filter the query for the "Leg?" control.... but this could be difficult because of table designs.

    Still looking at this.......

  9. #9
    linco is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Surrey, BC
    Posts
    7
    There isn't much data in the tables yet so I am open to suggestions on how to modify the tables.

    At this point, I would just like it to show in the Combo box - showing the Division ID# but not the desctiption doesn't work. I know the User will have to scroll though all the divisions for that dog, but I can't see another way to accomplish it.

    Lin

  10. #10
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I modified a lot of the field names, tables and form. I also removed spaces, punctuation and special characters.

    Maybe something like this????
    Attached Files Attached Files

  11. #11
    linco is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Surrey, BC
    Posts
    7
    Thank you! Thank you! Thank you! Yes, this does what I needed.

    Some questions on what you did:

    Why did you change the field names?
    --What does the PK and FK that you added stand for? (Primary Key-Foreign Key?)
    --Do spaces or punctuation cause problems?

    You used Visual Basic to create the event for Max leg. Could it have been done any way else? (I don't know VB - guess I am going to need to learn)

    All the Relationships that now exist - did you create them manually?

    again, thank you!

    Lin

  12. #12
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Why did you change the field names?
    Object names should ONLY be letters, numbers (exception is the underscore). NO spaces, punctuation or special characters.
    No one but a/the programmer should see the object names, so "correct" English is not needed and mostly detrimental (as far as programming design is concerned).


    What does the PK and FK that you added stand for? (Primary Key-Foreign Key?)
    Exactly. I use the suffixes to be sure of what field I am using/referring to. If I have "DogID" in a query, is that a PK, FK or normal field???


    Do spaces or punctuation cause problems?
    Yes, they can. ANY field (or object for that matter) with spaces in the name can cause problems. Yes, Access allows spaces but other dBs do not.
    In Access you MUST use brackets ( [] ) to enclose any field with spaces in the name.
    If you have a field name like "Phone#", the hash mark is a date delimiter for dates in Access. This can confuse (cause hard to find errors) Access and VBA.


    Not mentioned is the use of reserved words. Examples of reserved words are "Date", "Year", "Month". These 3 happen to also be built in functions. Plus, they are not very descriptive; "Date of what? "Year" of what? You get the idea...


    You used Visual Basic to create the event for Max leg. Could it have been done any way else?
    The only other way would be to use a macro.
    Could you use a macro? I don't know, because I never use macros. But I doubt it could be done in a macro.


    All the Relationships that now exist - did you create them manually?
    Yes, in the relationship window. The only other way would be to use DDL.... a lot of code for a one time process....


    And you are very welcome. Good luck with your project.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-09-2017, 03:27 PM
  2. Replies: 1
    Last Post: 11-18-2014, 12:35 PM
  3. Replies: 12
    Last Post: 10-23-2014, 02:08 AM
  4. Code to call Split Form View Datasheet
    By ahightower in forum Programming
    Replies: 1
    Last Post: 07-28-2011, 04:57 PM
  5. Replies: 0
    Last Post: 02-15-2011, 01:43 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