Results 1 to 4 of 4
  1. #1
    Daimios is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    12

    Question BrowseTo and DataEntry on navigation form

    Hi experts.

    Here's the situation : I have a navigation form "Navigation", in which I have two navigation buttons : one for "New agent", the other for "Change agent".

    New agent is linked to "Form_Agent_Entry", with DataEntry = Yes
    Change agent is linked to a report listing all the existing agents, "R_Agent_Change" and each line has a button that "BrowseTo" form "Form_Agent_Entry", hopefully with DataEntry forced to No.

    This last point doesn't work, as DataEntry seems to be impossible to modify.

    Either I switch it manually in design mode to Yes, and my initial entry process works, or I set it to No, and my change existing entries process works. Apparently, the BrowseTo command within the navigation subform does not overwrite the DataEntry property, even though I set it to AcFormEdit.

    Can anyone give me a hint ? This is driving me crazy.

    Thanks guys

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Dont set the data entry property...open the form with the settings...
    Code:
    'for edit
    DoCmd.OpenForm "fNames", , , , acFormEdit
    
    'and entry
    DoCmd.OpenForm "fNames", , , , acFormAdd

  3. #3
    Daimios is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    12
    Indeed, except that I wish not to open a new form, but to use the navigation subform instead, hence the BrowseTo command in which the acFormEdit/acFormAdd apparently have no effect on the Data Entry.

  4. #4
    Daimios is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    12
    Ok, I found a workaround :

    I created two functions : setChange and delChange, that respectively set a global variable "ChangeMode" = "X" and = "".

    If I go to the Entry form from the Change report, I call function setChange to set ChangeMode = "X".
    If I go to the Entry form from the Initial entry button, I call function delChange to clear ChangeMode.

    At Entry form load, system checks whether the ChangeMode is = "X". If it is, DataEntry is set to False and form is filtered on the specific agent to be changed. Else, system stays in DataEntry = True mode.

    Not that elegant, but it works well

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

Similar Threads

  1. Macro Search Form : BrowseTo
    By char in forum Access
    Replies: 0
    Last Post: 11-19-2012, 04:41 PM
  2. Replies: 1
    Last Post: 01-20-2012, 03:09 PM
  3. Replies: 2
    Last Post: 08-01-2011, 11:35 PM
  4. Replies: 9
    Last Post: 09-25-2010, 10:14 AM
  5. Replies: 2
    Last Post: 01-29-2010, 11:30 AM

Tags for this Thread

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