Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


change a form from edit to read-only after entering data in a combo box

Posted on 2004-10-27
Medium Priority
Last Modified: 2006-11-17
I have created a form that is read-only with loaded/opened. I have created a combo box that allows the user to select a record in the master database and then fills in the form.

I have been successful in getting the combo box to allow entry with allowedits=true in KEYPRESS, the form is filled in, but once I hit enter even though I have put allowedits=false in ON CLICK, ON ENTER.

Can this be done ? Have I forgotten something ?

Question by:proffittware
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 39

Expert Comment

ID: 12425233
use the AfterUpdate event of the combobox.
one way I have done this in the past is to put the "Find" combobox in a seperate subform that is not bound and has AllowEdits= true and leave the main form AllowEdits = False. You only need to adjust your FindFirst code to reference me.Parent...

If you want to go this way please post your code and we can fix it up :-)



Author Comment

ID: 12425435
Yes, I did the subform initially and it worked they way I wanted.

I was just trying to do a one screen "Find/Search", then data entry or read-only. I have buttons ADD, EDIT, SAVE that change the read-only/data entry back and forth. But the "FIND" combo box is a problem. Do you think this can be done?


Author Comment

ID: 12425572
I tried adding to my AfterUpdate:


In my AfterUpdate event I put the above statment - after the Private statement- tested and then before the End Sub- tested and they both did not work.

I had tried this before asking for help, maybe my AfterUpdate event has a problem?

Private Sub Text1_AfterUpdate()
Me.RecordsetClone.FindFirst "[SSN]=" & "'" & Me![Text1] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
LVL 39

Accepted Solution

stevbe earned 2000 total points
ID: 12426036
Private Sub Text1_AfterUpdate()
    Me.Recordset.FindFirst "[SSN]=" & "'" & Me![Text1] & "'"
    Me.AllowEdits = False
End Sub

Author Comment

ID: 12507582
Sorry I did not get back with you sooner...had Internet issues.

Thanks for your input !!!

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question