Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    Vrbic00 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    28
    Quote Originally Posted by Ajax View Post
    I think you would be better to find a template available in access that does what you want. Had a look at the video link and looks like it is building a search form.

    Suggest google 'access search form' to find an example - there will be plenty on this forum
    Understand and thank you very much.
    If I may I have last question I managed it. My query reacts on 2 text fields. But these are connected. Lets say in first are cities and in second shops. Is it possible to link it in such way that if I select some city I can choose only such shops which are in this city not all of them? I tried it...I created query with cities and shops and as table it looked good. But if I linked it as a source of list for second text field it doesn't work...I see only shops in this city but many times. There are duplicit shops. I tried change orde cities <->shops but it was same... Any suggestion?

  2. #17
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    sounds like what you want is what is called 'cascading combos'

    be aware that normal design rule is one table, one form. At the moment your subform has three tables

  3. #18
    Vrbic00 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    28
    Quote Originally Posted by Ajax View Post
    sounds like what you want is what is called 'cascading combos'

    be aware that normal design rule is one table, one form. At the moment your subform has three tables
    It seems that I have bad structure of my database So what would you suggest? Is some general rule how to avoid this problem?

    My problem is probably in my thinking. I believe I'm quite good in excel but I need more. Here I have to think other way and it is not so easy. Especially if you get in trouble, you use your experienced procedure.

  4. #19
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    excel and access are completely different

    Excel stores and displays data horizontally whilst Access stores data vertically and displays as required in forms and reports. i.e. 'tall and thin' rather than excel's 'short and wide'.

    Google 'normalisation' to understand more but basically it boils down to a) store data only once, b) do not store calculated data and c) do not build data into the structure. Excel 'breaks' all these rules

  5. #20
    Vrbic00 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    28
    Quote Originally Posted by Ajax View Post
    excel and access are completely different

    Excel stores and displays data horizontally whilst Access stores data vertically and displays as required in forms and reports. i.e. 'tall and thin' rather than excel's 'short and wide'.

    Google 'normalisation' to understand more but basically it boils down to a) store data only once, b) do not store calculated data and c) do not build data into the structure. Excel 'breaks' all these rules
    Understand. These 3 things, I probably know Maybe you noticed in my database. Or I'm trying to understand, but I don't have idea what is wrong with my displaying of data in subform. I understand that I need 3 tables but I can't see other way to solve it. You do? Have you dealed with such situation? How would you solve it? And if I may, are you Netherlander?

  6. #21
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    And if I may, are you Netherlander?
    nope - English with a bit of French and Welsh thrown in!
    but I don't have idea what is wrong with my displaying of data in subform
    what I don't understand is what exactly you are trying to do. Originally I thought it was to filter the records based an a specific value in a specific control on your form, then two form controls on two separate fields. But now I don't know

    Data does display in your form if you filter for a value that exists so I think you are saying you want a method to filter the data - but have not explained (or I have not understood) the basis you want to filter.

    here are some links to a search forms for some ideas

    https://www.accessforums.net/showthr...ht=search+form
    http://www.access-programmers.co.uk/...ht=search+form

  7. #22
    Vrbic00 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    28
    Quote Originally Posted by Ajax View Post
    nope - English with a bit of French and Welsh thrown in!
    I asked, because of your nickname.


    May I have another question? I created special thread for it so if you have time and mood, don't worry to write there
    https://www.accessforums.net/showthr...703#post330703


    Thank you for all.

  8. #23
    Vrbic00 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    28
    Heh only problems I have here...Why I'm not able to add new record in this form? It writes "it is not possible to add a value to free field on side "one"..." or "it is not possible to add a record . A linking key of table is not in a set of records". I guess problem is in relations yes? But I don't know what is wrong or what should I to do to fix it.

  9. #24
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    I guess problem is in relations yes?
    sounds like it - sounds like you are trying to enter a child record when the related parent does not exist

  10. #25
    Vrbic00 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    28
    Quote Originally Posted by Ajax View Post
    sounds like it - sounds like you are trying to enter a child record when the related parent does not exist
    I feel something like that but what should I do? I want to display a "names" not primary key. So I have relations between tables and in query I display data from different tables. How can I add new record in such case? I attach my file maybe better to try it.

  11. #26
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    the error is not about what you want to display, it is about adding a new record

    So parent is a table called say Company

    and child is a table called contacts

    you cannot add a contact without first adding a company

    you db is not attached - compact it then zip it

  12. #27
    Vrbic00 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    28
    Quote Originally Posted by Ajax View Post
    you db is not attached - compact it then zip it
    Oh sorry. Here it is.
    Generally I understand but I added a "name" which is in this table. Not new.
    Attached Files Attached Files

  13. #28
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    I think you are moving away from your original question.

    Note it will only display records if a record exists with both selections.

    I have modified both your forms - see attached

    I have modified the recordsource in LekarnyPodleMest podformulář form

    I have modified the rowsource, column count and column width properties in both combos

    There are other, more flexible ways for doing this, but I'm not sure of the detail of what you now want to do - e.g. is the list in the second combo dependant on the selection in the first combo? Do you want to see a list of records where a value exists for combo1 OR combo2?
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 1
    Last Post: 01-13-2015, 01:33 PM
  2. Help with Error in Macro
    By Sousuke81 in forum Macros
    Replies: 14
    Last Post: 09-10-2014, 11:09 AM
  3. Macro Error
    By Randy in forum Access
    Replies: 2
    Last Post: 01-28-2013, 10:32 AM
  4. Replies: 2
    Last Post: 05-05-2012, 02:34 AM
  5. Actualization query
    By slbenfica in forum Queries
    Replies: 36
    Last Post: 10-30-2010, 11:43 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