A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how do i make a start up form like northwind?



 
 
Thread Tools Display Modes
  #1  
Old March 30th, 2008, 07:50 PM posted to microsoft.public.access.forms
sgthatch2
external usenet poster
 
Posts: 1
Default how do i make a start up form like northwind?

pleas help ive loked at northwind but cant figure out how it works. i want
to be able for it not to ask me to never show it again

  #2  
Old March 30th, 2008, 08:20 PM posted to microsoft.public.access.forms
DM[_4_]
external usenet poster
 
Posts: 78
Default how do i make a start up form like northwind?

are you talking about a form that will pop up once (the first time you open
the database)?


"sgthatch2" wrote in message
...
pleas help ive loked at northwind but cant figure out how it works. i
want
to be able for it not to ask me to never show it again


  #3  
Old March 30th, 2008, 11:09 PM posted to microsoft.public.access.forms
Albert D. Kallal
external usenet poster
 
Posts: 2,874
Default how do i make a start up form like northwind?

Actually, the approach they use is quite complicated and convoluted.

The check box they use is UN-bound.

When you click the box (to set, or un-set) the check box, when you CLOSE the
form, code is RUN TO SET the startup form in the database properties.

Remember, if you unchecked this box, then some other form has to run so the
user sees something at startup time.

In a sense that complicated problem they are solving is not that you don't
wanna show the form again, but if you check that box, then they have to
write a budget code to set up and make sure that the user sees some other
form at startup.

if I just had a form that was supposed to launch and give the users some
information that I only want them to see once, then I would simply build a
form and bind it to a one record table with a field for the check box. This
approach means that the form could remember if it's posted display or not.

Thus, the bound check box idea in which we use a table to save the status
value value of the check box is a far more simple approach to hide a form. I
cannot stress again at the complex problem is not simply having a check box
to hide a form, but setting up code to launch some other form in its place.

The check "bound" check box idea is simply, and you simply would go in the
on-open event:

if me.CheckBoxDontShow = true then
cancel = true
end if

the question you'll have to answer here for a proper solution to your
question is if the person checks the box, do you want an alternate form to
display?

If yes, you could go:

if me.CheckBoxDontShow = true then
docmd.OpenForm "nameofAlternateForm"
docmd.closeform acForm,me.name
end if

The above code would give you essentially the same effect. Anyway, folwling
my signature below is a cut and paste of the north wind code that is used to
set the startup properties of the database.

I should add I think the NorthWind approach is a bit too complex of a
solution, but it does actually set your startup properties in your database
if that's your final goal here.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada


Function HideStartupForm()
On Error GoTo HideStartupForm_Err
' Uses the value of HideStartupForm check box to determine the setting for
' StartupForm property of database. (The setting is displayed in Display
Form
' box in Startup dialog box).
' Used in OnClose property of Startup form.
If Forms!Startup!HideStartupForm Then
' HideStartupForm check box is checked, so set StartupForm property
to Main SwitchBoard.
CurrentDb().Properties("StartupForm") = "Main SwitchBoard"
Else
' HideStartupForm check box is cleared, so set StartupForm
property to Startup.
CurrentDb().Properties("StartupForm") = "Startup"
End If

Exit Function

HideStartupForm_Err:
Const conPropertyNotFound = 3270
If Err = conPropertyNotFound Then
Dim db As DAO.Database
Dim prop As DAO.Property
Set db = CurrentDb()
Set prop = db.CreateProperty("StartupForm", dbText, "Startup")
db.Properties.Append prop
Resume Next
End If
End Function



  #4  
Old April 17th, 2008, 04:49 PM posted to microsoft.public.access.forms
Joe D[_3_]
external usenet poster
 
Posts: 2
Default how do i make a start up form like northwind? - AlbertD. Kallal

Quote:
if I just had a form that was supposed to launch and give the users some
information that I only want them to see once, then I would simply build a
form and bind it to a one record table with a field for the check box. This
approach means that the form could remember if it's posted display or not.

Thus, the bound check box idea in which we use a table to save the status
value value of the check box is a far more simple approach to hide a form. I
cannot stress again at the complex problem is not simply having a check box
to hide a form, but setting up code to launch some other form in its place.

The check "bound" check box idea is simply, and you simply would go in the
on-open event:

if me.CheckBoxDontShow = true then
cancel = true
end if

the question you'll have to answer here for a proper solution to your
question is if the person checks the box, do you want an alternate form to
display?

If yes, you could go:

if me.CheckBoxDontShow = true then
docmd.OpenForm "nameofAlternateForm"
docmd.closeform acForm,me.name
end if


Hi Albert, I like your idea but can't seem to implement it. Could you explain what you do in a little more detail please. The one field table you create, is that called CheckBoxDontShow or is the field?

And you use the option group tool to create the check box and have it bound to the field right?

Thanks in advance
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.