Results 1 to 6 of 6
  1. #1
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160

    Opening form in edit & still able to make Additons

    HI Guys,



    I have made a macro to open a form in edit mode, form by default I have set to following properties:

    Allow Additions = NO
    Allow Edits = No
    Data Entry = No
    Allow Deletions = No
    Allow Filters = Yes

    When I run the macro to open the form in Edit Mode, I am able to make edits but also able to add records. Similarly Also made a macro to open form in New Data Entry Mode (Same form), under this macro form opens in new mode & I am able to make entries. But as first entry is finished and second entry starts, I am able to go to previous record and make changes.

    I want to restrict edit mode to editing forms and New mode to only additions of new records. Kindly help.

    Awaiting your help and guidance.
    Thanks and regadrs
    Deepak Gupta

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    i dont see how. When I set these, I cannot add records.

  3. #3
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    With these properties, if i open form directly I am also unable to make changes. But when I open through macro with edit, I am able to make changes in existing records but Also able to add new records(First Issue).

    Secondly when opening form in Add record mode, I don't get old added records and macro at first looks like to be working fine, but when the second record (in continuation) is added I am able to makes changes to the recently added previous record.

    I also want to set property of record selector to NO, and when open the form in Edit mode want it to show up? This way my second problem would also be taken care of atleast for operational purposes. Is there any way to do that.

    Thanks and Regards
    Deepak Gupta

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    What exactly are you trying to achieve? Is it based on a user - some can edit and some can add - or what is the logic behind these two different modes? Once we know what your process is we can help, this seems a convoluted way of accomplishing your requirements.

  5. #5
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    Hi aytee,

    All i am trying to do is make two options for the users
    1. for entry of new bills only
    2. I want to create a form where a user can enter either date range or bill number or customer name to get results through a query and from that report (based on Query) he can open the desired bill to make changes. Hence I want to open the form in on edit mode only to allow changes in the bill details.

    Actually now that it has come up I also want to make sure that only that particular bill is opened and no other bill can be opened while in edit mode hence could you please guide me whether to use macro for the purpose or should go for VBA. I have no experience in VBA coding.

    Awaiting your help.
    Thanks ad Regards
    Deepak Gupta

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    For new bills, make a button that says New or Add or something like that, when they click on it you will go to a new record (in VBA it is DoCmd.GoToRecord,,acNewRec)

    For editing an existing bill, have an unbound combobox where the user will select the description/name associated with the primary key of the record source. When they select this record, filter the form to that exact record.

    For a search feature where the user does not know the exact record they want to look at/edit, this can be done in a number of ways. The result is that you will present them with a number or records and they will select the one they want, then you will filter the form to that record. You can have a search button which opens another form, the user enters their search fields and the relevant records are shown; they select one of them and that primary key is sent back to the original form and the form is filtered to that record. You could have a listbox on the form which again shows the relevant records form their search fields, they select one and the form is filtered.

    When the Cycle property of the form is set to Current Record then you don't have to mess around with setting all those other options. It is best to keep this as simple as possible. Once a record is displayed on the form, either adding a new one or editing an existing one, then it is in edit mode regardless.

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

Similar Threads

  1. Replies: 18
    Last Post: 08-02-2017, 12:56 PM
  2. Replies: 7
    Last Post: 08-06-2016, 07:05 PM
  3. Replies: 9
    Last Post: 10-17-2012, 11:37 AM
  4. Opening Saved data in form in Edit mode
    By l3111 in forum Forms
    Replies: 7
    Last Post: 06-06-2011, 11:37 AM
  5. Replies: 7
    Last Post: 12-24-2009, 08:44 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