Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    dref is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    55

    thanks alot. its working perfect.

  2. #17
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You are welcome. Good luck with your project.

  3. #18
    dref is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    55
    My friend. Do you know of any code that can disable a database when the name of the company is changed on the startup form or when the database path is changed?
    Thanks

  4. #19
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Do you mean when the company name is changed in a control on the form such as a text box or combo box? If so, you can just close the database in the after update event of that control. (DoCmd.Quit) I'm not sure if that will do anything for you. You could just prevent the user from changing it by locking the control. (set the locked property to yes) Changing the path or location of the database is something that would have to be controlled outside of Access (If I understand what you mean).

  5. #20
    dref is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    55
    Quote Originally Posted by jzwp11 View Post
    Do you mean when the company name is changed in a control on the form such as a text box or combo box? If so, you can just close the database in the after update event of that control. (DoCmd.Quit) I'm not sure if that will do anything for you. You could just prevent the user from changing it by locking the control. (set the locked property to yes) Changing the path or location of the database is something that would have to be controlled outside of Access (If I understand what you mean).

    Yes. if the text box is txtconame which displays the company name in frstart( which is my start up form),how should my code look like. or the macro look like.
    Thanks

  6. #21
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    I gave you the code to quit which would close the database: DoCmd.Quit. It would go in the after update event of the control (text box). Now is the form a bound form (tied to a table or query)?


    ...disable a database...
    What exactly do you mean by disable the database? If you disable the database, it implies that the user cannot do anything. Could you please explain in more detail how the user is suppose to progress from the main form to do tasks in the database?

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Budget and Collections(Actuals)
    By dref in forum Forms
    Replies: 0
    Last Post: 08-19-2010, 03:39 AM
  2. Access - Budget database
    By fanzak in forum Database Design
    Replies: 1
    Last Post: 07-22-2010, 02:24 AM
  3. Calculating "remaining budget $'s by project"
    By madcreek in forum Queries
    Replies: 3
    Last Post: 04-28-2010, 12:14 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