Results 1 to 7 of 7
  1. #1
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    277

    Question Data entry forms

    Hello everybody,



    I am creating a company database and I am in the phase of creating forms. What I want is to have read only forms for orders, customers, etc. I already have those.

    Here are some examples:

    Click image for larger version. 

Name:	orders-overview.PNG 
Views:	24 
Size:	33.1 KB 
ID:	27290





    This is the orders overview form. Each order has a button to display a corresponding Order details form. The second button in the header says "Create a new order" in English.


    Click image for larger version. 

Name:	order-details.PNG 
Views:	23 
Size:	54.8 KB 
ID:	27291












    This is the order details form with a subform of individual units. Read only as well, the button at top says "Edit order"


    The thing is that I don't want to allow users to accidentaly modify data. If they want to modify them, they need to press a respective button. A form would open in a dialog mode with options "Cancel" and "Save and close".

    Add a new order button will open a form in add mode, all fields blank, edit order will display the same form but with the record opened and allowed for editing.

    What is the best way to approach this? Use VBA or macros? It is my first database so I haven't created data entry forms before.

    Specific questions I have:
    1. How do I create a form in add new record mode?
    2. How do I force that same form to open at a specified record? (When "edit order" button is pressed)
    3. How do you recommend to approach editing individual units? Is it possible to have a subform in the data entry form where I can add/modify units?
    4. If it is a data entry form, it should be connected to a table, not a query, correct?
    5. I tried to play with the options a bit. I tried to take a form and change DATA ENTRY in the property sheet to YES. I still cannot edit the data. Why is that?



    Thank you very much,
    Tomas

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    1. docmd.OpenForm "myForm",,,,acFormAdd

    2. docmd.OpenForm "myForm", ,,"[id]=" & me.ID,acFormEdit

    3. yes, subform can edit records to. me.subform.form.allowedits = true

    4. query or table. I like query better. I can control more things.

    5. the form may be set to locked = true
    the query behind it may not allow it,

  3. #3
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    277
    Thank you but this unfortunately doesn't work for me.

    I created this data entry form:

    Click image for larger version. 

Name:	dataentry2.PNG 
Views:	19 
Size:	34.9 KB 
ID:	27292

    And attached this code to a button:

    Click image for larger version. 

Name:	dataentry1.PNG 
Views:	19 
Size:	7.0 KB 
ID:	27293

    However, the form opens filled with a first order record and can't be edited. Data entry is set to yes. What am I doing wrong?

    Thank you,
    Tomas

  4. #4
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    277
    I just read somewhere that some queries won't allow for data to be modified. How can I identify such a query and how to fix it?

    Thank you,
    Tomas

  5. #5
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    A non-updateable query is a standard situation when there is not a clear & certain join between table records. For instance if one table is an aggregate query, or if the join is not on key fields and returns multiple records on both sides of the join. Often designers run into this when the query is joining multiple tables and can be difficult to anticipate. To experiment - eliminate tables 1-by-1 from your query until it becomes update-able.

    But the way around this is instead to rely on main form / sub form designs - and not attempt to bring together all the information into a query and 1 form alone.

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Yes, that's right. When a query has outer joins or too many tables or other not straightforward expressions then it can't be updated. Test it by running the query and trying to change something or add a new record. Having a table as a record source on a form it the best and surest method, you can use a subform to show the data you want to be updated.

  7. #7
    Thomasso is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    277
    Got it, thank you guys :-)

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

Similar Threads

  1. Replies: 2
    Last Post: 06-11-2015, 08:42 AM
  2. Replies: 2
    Last Post: 11-05-2014, 09:16 AM
  3. Data Entry into Forms
    By Lasso in forum Forms
    Replies: 5
    Last Post: 08-27-2014, 10:19 PM
  4. Double Data Entry Forms
    By huongdl1987 in forum Programming
    Replies: 3
    Last Post: 09-14-2013, 01:57 AM
  5. Replies: 0
    Last Post: 03-13-2011, 06:46 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