473,396 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Developing in front end

I design the front end of my app in MyAppName-develop.mdb. When I want to
deploy it I copy it and change the name to MyAppName.mdb. In the development
mdb I want a different start up option then in the mdb for the users: start
up with no database window but with the main menu form of my app. Is there a
way to prevent myself from having to change the start up settings manually
everytime I want to deploy my app. How do you guys do that?
thanks,
john
Jun 16 '07 #1
7 1859
Per John:
>I design the front end of my app in MyAppName-develop.mdb. When I want to
deploy it I copy it and change the name to MyAppName.mdb. In the development
mdb I want a different start up option then in the mdb for the users: start
up with no database window but with the main menu form of my app. Is there a
way to prevent myself from having to change the start up settings manually
everytime I want to deploy my app. How do you guys do that?
I go a little further and call it myAppName.001.mdb... my
AppName.002.mdb... depending on it's version.

Set up an AutoExec macro that executes a routine written in VBA
that does stuff like this (starting around line 1070):
----------------------------------------------------
Function AutoExec() As Boolean
1000 debugStackPush mModuleName & ":AutoExec"
1001 On Error GoTo AutoExec_err

' PURPOSE: To perform any and all AutoExec processing
' NOTES: 1) Called by "AutoExec" macro

1003 Dim i As Long
Dim myFormName As String
Dim productionMode As Boolean
Dim myUserID As String
Dim myComputerName As String
Dim myLockMessage As String
Dim okToProceed As Boolean
Dim myAppTitle As String
Dim myWorkDbPath As String
Dim myHistoryUpdatedDate As Variant
Dim myDaysToAdd As Long
Dim myLastBackFillDate As Variant

Const appTitleProblem = "There was a problem in AutoExec
setting application title."
Const moveAfterEnter_DoNotMove = 0

'LogTime True, "AutoExec - Begin"
1006 myUserID = CurrentUserGet()
1007 myComputerName = ComputerNameGet()
1009 IniValue_Put myUserID, Format$(Now(), "yyyy-mm/dd-hh:nn"),
"Logged On"

1010 DoCmd.Hourglass True
'
--------------------------------------------------------------------------------------------
' We need to create all work tables before re-conecting them
because if a table does not
' exist, MS Access will not let us alter the connection string

1030 myWorkDbPath = WorkDbPath_Get()
1031 dataBaseDelete myWorkDbPath 'So the work db does not
get bigger-and-bigger day-after-day
1039 okToProceed = True

1040 If okToProceed = True Then
1041 okToProceed = False
1042 If ConnectRefresh() = True Then
'LogTime False, Space(3) & "ConnectRefresh"
1043 myAppTitle = IniValue_Get("ProgramParms", "TitleBar")
1044 If Len(myAppTitle) = 0 Then
1045 myAppTitle = appTitleProblem
1049 End If

1050 If applicationPropertySet("AppTitle", dbText,
myAppTitle) = True Then
1051 Application.RefreshTitleBar
1052 okToProceed = True
1053 Else
1054 BugAlert False, appTitleProblem
1059 MsgBox appTitleProblem, vbCritical, "Application
Cannot Be Run"
1060 End If
1061 okToProceed = True
1062 DoCmd.Hourglass True
1063 End If
1069 End If

' '
--------------------------------------------------------------------------------------------
' ' In part, want to carve out as much screen space as possible
- given that at least some
' ' people are running their monitors at 800x600
'
1070 If okToProceed = True Then
1071 okToProceed = False
1072 productionMode = ProductionMode_Get()
'
'1073 For i = 0 To Forms.Count - 1 'Subsitutes a
dummy menu bar
'1074 Forms(i).MenuBar = "mnuDummy"
'1075 Next i
''LogTime False, Space(3) & "Menu Bars dummied"
'
1076 DeveloperMenusToggle Not ProductionMode_Get()
''LogTime False, Space(3) & "DeveloperMenusToggle"

'
--------------------------------------------------------------------------------------------
' This keeps us from jumping from one control to another when
the user presses Enter.
' In the case of a ListBox, we want to capture Enter and call
DblClick processing.

1077 Application.SetOption "Move After Enter",
moveAfterEnter_DoNotMove
1078 okToProceed = True
'
--------------------------------------------------------------------------------------------
1079 End If

'
--------------------------------------------------------------------------------------------
' Ensure that each tranche has a payment record and a price
record for each day since
' a certain date

1090 StatusSet "Updating Payment/Price History Tables..."
1091 myHistoryUpdatedDate = IniValue_Get(gProgramParms,
"HistoryUpdatedDate")
1092 If IsDate(myHistoryUpdatedDate) Then
1093 myDaysToAdd = DateDiff("d", Date, myHistoryUpdatedDate)
1094 myDaysToAdd = Abs(myDaysToAdd)
1095 If myDaysToAdd <0 Then
1096 StatusSet "Updating Payment/Price History Tables..."
'1097 Payment_EmptyRecordsAppend_AllTranches
myHistoryUpdatedDate, myDaysToAdd
1098 PriceHistory_EmptyRecordsAppend_AllTranches
myHistoryUpdatedDate, myDaysToAdd
1099 IniValue_Put gProgramParms, "HistoryUpdatedDate", Date
1100 End If
1199 End If

'
--------------------------------------------------------------------------------------------
' Backfill tblGlobalMarketValue if necessary

1210 myLastBackFillDate = IniValue_Get(gProgramParms,
"LastBackFillDate")
1211 If IsDate(myLastBackFillDate) Then
1212 If DateDiff("d", Date, myLastBackFillDate) <0 Then
1214 GlobalMarketValues_BackFill False
1215 IniValue_Put gProgramParms, "LastBackFillDate", Date
'It's been done, but not today... so do it
1216 End If
1219 Else
1221 GlobalMarketValues_BackFill False 'It's never, ever been
done... so do it
1222 IniValue_Put gProgramParms, "LastBackFillDate", Date
1229 End If
'
--------------------------------------------------------------------------------------------

1310 If okToProceed = True Then
1311 okToProceed = False
1313 StatusSet ""
1314 MonthlyCheck_ReferenceRates
1315 MonthlyCheck_GlobalMarketValues
1316 DoCmd.OpenForm "frmHome"
1329 End If

'LogTime False, "AutoExec - End"
1990 DoCmd.Hourglass False

AutoExec_xit:
DebugStackPop
On Error Resume Next
Exit Function

AutoExec_err:
BugAlert True, ""
Resume AutoExec_xit
End Function
Private Function applicationPropertySet(ByVal thePropertyName As
String, ByVal thePropertyType As Variant, ByVal thePropertyValue
As Variant) As Integer
debugStackPush mModuleName & ": applicationPropertySet"
On Error GoTo applicationPropertySet_err

' PURPOSE: To set the named application property or, if it
doesn't exist, create it and then set it.
' ACCEPTS: - Name of the property
' - Type of the property
' - Value we want the property set to
' RETURNS: True or False depending on success
'
' NOTES: If this is used to set the AppTitle, the call to this
routine must be followed
' by an "Application.RefreshTitleBar" or you will not
see the new title until the
' app has been closed and then re-opened.

Dim myProperty As Property

Const propertyNotFound = 3270

curDB().Properties(thePropertyName) = thePropertyValue

applicationPropertySet = True

applicationPropertySet_xit:
DebugStackPop
On Error Resume Next
Exit Function

applicationPropertySet_err:
If Err = propertyNotFound Then
Set myProperty = curDB().CreateProperty(thePropertyName,
thePropertyType, thePropertyValue)
curDB().Properties.Append myProperty
Resume
Else
BugAlert True, "Property Name = '" & thePropertyName & "',
Type = '" & thePropertyType & "', Value = '" & thePropertyValue
& "'."
End If
End Function
----------------------------------------------------
--
PeteCresswell
Jun 16 '07 #2
"John" <jo@hn.comwrote in
news:f5***********@textnews.wanadoo.nl:
I design the front end of my app in MyAppName-develop.mdb.
When I want to deploy it I copy it and change the name to
MyAppName.mdb. In the development mdb I want a different start
up option then in the mdb for the users: start up with no
database window but with the main menu form of my app. Is
there a way to prevent myself from having to change the start
up settings manually everytime I want to deploy my app. How do
you guys do that? thanks,
john
I just set a variable to environ("username") ="RQuintal"
and branch to the appropriate code.to show database window, etc. if
it returns true.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 17 '07 #3
Thanks Bob en Pete. That helps.
john

"Bob Quintal" <rq******@sPAmpatico.caschreef in bericht
news:Xn**********************@66.150.105.47...
"John" <jo@hn.comwrote in
news:f5***********@textnews.wanadoo.nl:
>I design the front end of my app in MyAppName-develop.mdb.
When I want to deploy it I copy it and change the name to
MyAppName.mdb. In the development mdb I want a different start
up option then in the mdb for the users: start up with no
database window but with the main menu form of my app. Is
there a way to prevent myself from having to change the start
up settings manually everytime I want to deploy my app. How do
you guys do that? thanks,
john

I just set a variable to environ("username") ="RQuintal"
and branch to the appropriate code.to show database window, etc. if
it returns true.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 17 '07 #4
No need to re-name the mdb....

distibite a mde to your users....

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc).

Also, using these options means you do not have to bother setting up
security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKal...s/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.

You can get this at:

http://www.members.shaw.ca/AlbertKal.../msaccess.html

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you must
shift-by-pass them when you want to work.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute...

You mdb will have all of the startup set so you can easlily "test" the
featurs. You can't set a bunch of startup stuff..and never test it......

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Jun 17 '07 #5
Thanks Albert, that sounds good. I just tried a couple of times to make an
mde but that makes my Access crash. I'll do some more checking later.
john

"Albert D. Kallal" <Pl*******************@msn.comschreef in bericht
news:mugdi.34136$NV3.31720@pd7urf2no...
No need to re-name the mdb....

distibite a mde to your users....

You most certainly can, and should hide all of the ms-access interface.
The
options to complete hide and keep people out of the ms-access interface
can
easily be done using the tools->start-up options. Using those options
allows you to complete hide the ms-access interface (tool bars, database
window etc).

Also, using these options means you do not have to bother setting up
security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKal...s/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options.
If want, you can even disable the shift key by pass. I have a sample mdb
file that will let you "set" the shift key bypass on any application you
want.

You can get this at:

http://www.members.shaw.ca/AlbertKal.../msaccess.html

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test
in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test
as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you
must
shift-by-pass them when you want to work.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute...

You mdb will have all of the startup set so you can easlily "test" the
featurs. You can't set a bunch of startup stuff..and never test it......

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com


Jun 17 '07 #6
John wrote:
way to prevent myself from having to change the start up settings manually
everytime I want to deploy my app. How do you guys do that?
No offence meant, John, but this sounds like a big fuss. Just put a
copy of the FE and BE in a development folder and have at it. I keep
all versions of FE/BE in folders named after the version number, ie,
1.00.02, etc. Then, when done, refresh your links to the prodiction
back end and plop the FE whereever you need it.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Jun 17 '07 #7
Per Tim Marshall:
I keep
all versions of FE/BE in folders named after the version number, ie,
1.00.02, etc.
Call me obsessive, but I keep all my old versions as .Zip files.

That way I know for sure that I won't fat-finger any of the code
- as in opening up an old version to clone some code into another
app.
--
PeteCresswell
Jun 18 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: Ben | last post by:
I'm new to PHP. The ease of use, power, flexibility and low overhead to run it is amazing. I am tempted to convert my entire software to PHP but have a few questions and concerns before heading...
7
by: dad | last post by:
REQ: any utilities for designing front-ends for databases
3
by: rdemyan via AccessMonster.com | last post by:
I'm thinking about providing a relatively easy method for users to restore the front end from a backup. The purpose is to allow for restoring if the front end becomes corrupt. Here are some...
5
by: rdemyan via AccessMonster.com | last post by:
I have code in my front end that opens a form for backing up the front end. I'll give a brief description of what the form does: 1) When the backup form opens, it closes all open forms except for...
23
by: Louly | last post by:
Hi everybody, I'm a 22 yrs old girl. I've been developing a Database for 6 months no using Access. A week ago I had this feeling that I'm wasting my time in Access. I don't think it's wise to...
1
by: Gil Lapid | last post by:
Hi, What is the recommended way to develop DB2 Mainframe application without buying this expensive hardware/software ? I'd like to develop the software for a Mainframe customer. Thanks, ...
11
by: Max Vit | last post by:
I have deployed few Access apps splitting it in Front End and Back End. Our environment uses Win XP SP2 for clients, Win 2k3 for servers and Access 2003. The max. number of clients is about 50...
1
by: ShambhuHubli | last post by:
Hi ! I am developing front end for some application using Python Tkinter. And I am new to this GUI development. In my application, I have to create buttons other than square or rectangle. I want...
11
by: Gabriel | last post by:
Hi anybody intested in developing JSLibrary by yourslef??The project "Knut" has risen up,intend to building a new JSLibrary,more detail visit http://groups.google.com/group/knutDN ,we hope you to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.