Click to not show form again.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a form when new users get's access to the front end of the database a
form pop-up to ask user if they want to go to tutorial. I want a check box
in the form so that when user click on check box this form will not show up
again when the user start the front end again. How do i do that?
 
On Mon, 5 Nov 2007 10:09:03 -0800,
Hi,

I have a form when new users get's access to the front end of the database a
form pop-up to ask user if they want to go to tutorial. I want a check box
in the form so that when user click on check box this form will not show up
again when the user start the front end again. How do i do that?

You can adapt the method used in the StartUp form in the
Northwind.mdb sample database that ships with Access.

Or you can simply add a table to your database.
Table name "ShowForm"
Add 1 field named "ToStart", Yes/No datatype, check box.

On the Form, set this table as the form's record source. *
Set the field [ToStart] as the check box's Control Source. *

Code the Form's OpenEvent:
Cancel = [ToStart] = -1 Then

If the check box is checked, the form will not open.

Anytime you modify the database, simple reset the field to 0 (manually
or by code).
The form will now re-appear until checked.

* If you can't make the table the form's record source, delete the
control source from the check box.
Simply code the now unbound check box AfterUpdate event:

CurrentDb.Execute "Update ShowForm set ShowForm.ToStart = -1;",
dbFailOnError

Code the Form's Open event:
Cancel = DLookUp("[ToStart]","ShowForm")=-1
 
Hi Fredg,

Thanks for the swift response. I don't have any data attached to the form.
The form is just like a splash pop-up. I just want to add a check box for
the user to click to check it so that the splash pop-up will not show again
when the user open the front end. Hope I clearified it more.

fredg said:
On Mon, 5 Nov 2007 10:09:03 -0800,
Hi,

I have a form when new users get's access to the front end of the database a
form pop-up to ask user if they want to go to tutorial. I want a check box
in the form so that when user click on check box this form will not show up
again when the user start the front end again. How do i do that?

You can adapt the method used in the StartUp form in the
Northwind.mdb sample database that ships with Access.

Or you can simply add a table to your database.
Table name "ShowForm"
Add 1 field named "ToStart", Yes/No datatype, check box.

On the Form, set this table as the form's record source. *
Set the field [ToStart] as the check box's Control Source. *

Code the Form's OpenEvent:
Cancel = [ToStart] = -1 Then

If the check box is checked, the form will not open.

Anytime you modify the database, simple reset the field to 0 (manually
or by code).
The form will now re-appear until checked.

* If you can't make the table the form's record source, delete the
control source from the check box.
Simply code the now unbound check box AfterUpdate event:

CurrentDb.Execute "Update ShowForm set ShowForm.ToStart = -1;",
dbFailOnError

Code the Form's Open event:
Cancel = DLookUp("[ToStart]","ShowForm")=-1
 
On Mon, 5 Nov 2007 12:00:02 -0800,
Hi Fredg,

Thanks for the swift response. I don't have any data attached to the form.
The form is just like a splash pop-up. I just want to add a check box for
the user to click to check it so that the splash pop-up will not show again
when the user open the front end. Hope I clearified it more.

fredg said:
On Mon, 5 Nov 2007 10:09:03 -0800,
Hi,

I have a form when new users get's access to the front end of the database a
form pop-up to ask user if they want to go to tutorial. I want a check box
in the form so that when user click on check box this form will not show up
again when the user start the front end again. How do i do that?

You can adapt the method used in the StartUp form in the
Northwind.mdb sample database that ships with Access.

Or you can simply add a table to your database.
Table name "ShowForm"
Add 1 field named "ToStart", Yes/No datatype, check box.

On the Form, set this table as the form's record source. *
Set the field [ToStart] as the check box's Control Source. *

Code the Form's OpenEvent:
Cancel = [ToStart] = -1 Then

If the check box is checked, the form will not open.

Anytime you modify the database, simple reset the field to 0 (manually
or by code).
The form will now re-appear until checked.

* If you can't make the table the form's record source, delete the
control source from the check box.
Simply code the now unbound check box AfterUpdate event:

CurrentDb.Execute "Update ShowForm set ShowForm.ToStart = -1;",
dbFailOnError

Code the Form's Open event:
Cancel = DLookUp("[ToStart]","ShowForm")=-1

I believe I answered your question.
You can use the method found in the Northwind sample database, or use
the method of adding a table to the database that I mentioned. It does
exactly what you wish to do.
 
No matter what you do you need a place to store the status of the checkbox,
so its really a question of how you want to do that.

1) you could change the default value of the checkbox at design level
and then save the form, but that won't work if using Runtime mode. In
addition, the setting would not persist across front-end replacement. This
would generally be considered a poor solution.

(The following alternatives require saving the value and then reading
the value every time the db is opened)

2) you could store the value in a custom database property (as is done
in Northwind) but the user would have to check/uncheck the box every time
the front end is replaced. The saved value wouldn't persist across
frontend replacement.

3) Storing the value in a local table has the same drawbacks as #2

4) you could create a new backend table that would store *each user's*
selection. This has the advantage of 1) not changing if the frontend is
replaced and 2) no matter what machine the user sits down at, the app will
"remember" the user's selection and 3) it would allow you to "reset"
everyone's (or select individuals) selection if you want to force users to
read a revised splash screen with a simple update query to the backend
table.

5) you could store/read the value in the registry with
SaveSetting/GetSetting. This would allow persistance across front end
replacement, but not across machines.

I tend to favor the backend table approach (#4) and I use it to store a
number of settings. Each user might have 4 or 5 records in the table, each
record representing a single setting like "Show Splash" or "LastIDViewed".

--
HTH,
George


"E-mail report using Lotus Notes rather t"
Hi Fredg,

Thanks for the swift response. I don't have any data attached to the
form.
The form is just like a splash pop-up. I just want to add a check box for
the user to click to check it so that the splash pop-up will not show
again
when the user open the front end. Hope I clearified it more.

fredg said:
On Mon, 5 Nov 2007 10:09:03 -0800,
Hi,

I have a form when new users get's access to the front end of the
database a
form pop-up to ask user if they want to go to tutorial. I want a check
box
in the form so that when user click on check box this form will not
show up
again when the user start the front end again. How do i do that?

You can adapt the method used in the StartUp form in the
Northwind.mdb sample database that ships with Access.

Or you can simply add a table to your database.
Table name "ShowForm"
Add 1 field named "ToStart", Yes/No datatype, check box.

On the Form, set this table as the form's record source. *
Set the field [ToStart] as the check box's Control Source. *

Code the Form's OpenEvent:
Cancel = [ToStart] = -1 Then

If the check box is checked, the form will not open.

Anytime you modify the database, simple reset the field to 0 (manually
or by code).
The form will now re-appear until checked.

* If you can't make the table the form's record source, delete the
control source from the check box.
Simply code the now unbound check box AfterUpdate event:

CurrentDb.Execute "Update ShowForm set ShowForm.ToStart = -1;",
dbFailOnError

Code the Form's Open event:
Cancel = DLookUp("[ToStart]","ShowForm")=-1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top