Results 1 to 9 of 9
  1. #1
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48

    Automatically complete entries in table ...

    hello,
    i am not sure but i think this is a general question:

    I have a Form with a Subform that displays a table/query. The form also contains a ComboBox to apply a filter.
    Now it is possible to add a record to the displayed table, or better, the table from which my filter-query receives it's data, but i have to manually set the value for the field that the filter applies to. I want to auto-fill this field with the Value in the CBO elt. but i don't know a comfortable way to do so.

    To make it more clear:

    tbl1: Typ, Container

    tbl2: Container

    CBO has tbl2 as Datasource and the "filter" is a query that is altered via VBA code to "SELECT * FROM tbl1 where Container = (CBO.Text)"

    There is a shorter table displayed, when the filter is applied, but if i add an element now, it is not assured that "Container" takes the value (CBO.Text). But i want to make that sure, so one doesn't need to add this information and to make sure (after using the filter) one can only add elts. to tbl1 with Container = (CBO.Text)....

    .... is my problem clear ?



    I'd appreciate any hint.

    Kind regards,
    ...

  2. #2
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    Well I believe the best way would be to use VBA because what I am getting out of this is that you want to keep that value under CBO and your end users only have the ability to add etls Correct?

    Okay well Can I get some screen shots?

  3. #3
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48
    Hello again,

    that Screenshot is a little big ... now a little small ...(edit: oh, no, it's allright), but it is nearly how i want it to be like. The CBO can be altered by the User, that is intended. In my example a longer list of things is filtered for the Garage in which they are stored ....
    Click image for larger version. 

Name:	garg_exmpl.png 
Views:	8 
Size:	11.4 KB 
ID:	17219

    It seems to me that i have to go through the displayed entries and search for empty fields, but in the properties of my subfunction i only find enter and exit fcns that i can specify in VBA. That is my first problem, because i can not easily have sort of "Updated/Altered" - method, in which i could be sure there is only the last entry in my source table that may have empty entries and just set these according to the filter option.

    So, i just don't know how to go ahead ... i do not even know how to loop through the table (which i would have to do i guess, to achieve what i intend in a "Exit" method.

    greetings and thanks for your interest,

    ....

  4. #4
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    So are your end users actually editing the data in your tables?

  5. #5
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48
    Yes, to some extent this can not be avoided ... this is an example for a somehow very direct way to do this. Another would be to have an "add_thing" button which opens a form where you can enter all the data ... but that would be not too comfortable as well, or ?

  6. #6
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    Well if a user changes deletes or removes record for the tables they are gone forever not saying you can trust people but accidents can happen.
    What I would suggest just because its much more valuable in the long run would be to have a main form that has an edit form a main records form and other forms for searching and other form that are needed . . .
    running through the forms is a much better way for your database to be secure . . I am saying you get way more edits and customization's to your data through the forms.

  7. #7
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48
    Well, data deletion would be a problem indeed, and it is NOT intended so far.
    So you suggest s.th. like the "add_entry" form, right ? Well, I'll do so.

    Another question: Is there a way to export parts of a database as a new database ?

    My DB will have a structure that consists of "editable" (extendable) tables and of some tables that cannot be altered by the user. It would be of great benefit, if one was able to export parts of those extendable tables along with the fixed tables as a new but smaller DB at some point.

    I might make another thread from that ...


    Kind regards, thanks for your advice so far and a nice weekend,

    ...

  8. #8
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    Exporting parts yes its possible but if you want the data to be the same you should make sure that the tables are linked

  9. #9
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48
    Sorry i'm late.
    Thanks for the help, i think i'll back when i am busy with exporting DBs, but I'll open a new thread for that.

    So long,
    ...

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

Similar Threads

  1. Replies: 1
    Last Post: 12-09-2013, 04:23 PM
  2. Replies: 1
    Last Post: 11-18-2013, 06:33 PM
  3. Replies: 5
    Last Post: 10-24-2013, 04:17 PM
  4. Replies: 37
    Last Post: 01-11-2012, 02:16 AM
  5. Replies: 2
    Last Post: 04-20-2011, 06:59 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