Converting a form + DB to an executable

  • Thread starter Thread starter Mik
  • Start date Start date
M

Mik

Hi all,

I am from a Visual FoxPro background and am new to Access 2003.

I have just designed a database, together with tables and forms, for a
user who has Microsoft Office 2003 Professional.

Now that I have finished I would like to "package" the whole thing
into a runtime version of the project where all the user has to do is
use the package without having access to the Access menus, without
having to open Access - ie. it runs just using the Access 2003
runtimes which will already be on the PC since he has MSOffice 2003
Pro.

How do I do that ?

Thanks for the help.

Mik
 
There are no executables for databases, but you won't need them since he
already has the Access exe on his machine. If you want to lock up your code,
make an MDE file (Tools ... Database Utilities ... Make MDE) from the
database front-end. You'll need to convert the app to the current version of
Access to make an MDE.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Thanks Arvin,

I had tried that earlier and thought that would be the way to go. If
you can bear with me I have some questions :

1) How do I make one form open by default, or,
alternatively, create a menu of options
where each option leads to a different form ?

2) I created a DELETE RECORD button
using the wizard. When you click it,
the record behind it goes to the LAST record. I had a look
at the code and as it is my first day I could not
yet work out why this was happening.
Any clues ?


Thanks
Mik
 
Thanks Arvin (amended),

I had tried that earlier and thought that would be the way to go. If
you can bear with me I have some questions :

1) How do I make one form open by default, or,
alternatively, create a menu of options
where each option leads to a different form ?

2) I created a DELETE RECORD button
using the wizard. When you click it,
the record behind it goes to the LAST record. I had a look
at the code and as it is my first day I could not
initially work out why this was happening.

I have since started to work out what is happening.
The CLICK code for the DELETE RECORD button is
as follows :

=====================
Private Sub Delete_Record_Click()
On Error GoTo Err_Delete_Record_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Delete_Record_Click:
Exit Sub

Err_Delete_Record_Click:
MsgBox Err.Description
Resume Exit_Delete_Record_Click

End Sub
=====================

Although this is my first day, from the above I assume the code
executes the relevant Access 2003 menu option for "Delete Record"
(how approximate!!!). My first problem is that if I hit NO to "Do
you want to delete", then "MsgBox Err.Description" gets executed
with a weird error message, instead of simply going back to the
record. I assume the ON ERROR is to trap an error if someone tries
to delete a record that is in use by someone else, but how can I just
get it to exit back to the record gracefully if I say NO to the
deletion confirmation dialogue ?


Thanks
Mik




Thanks
Mik
 
Mik said:
Thanks Arvin,

I had tried that earlier and thought that would be the way to go. If
you can bear with me I have some questions :

1) How do I make one form open by default, or,
alternatively, create a menu of options
where each option leads to a different form ?

tools->startup

(in fact, in the startup options, you can set all kinds of things to hide
the ms-access interface).

So, you can simply build a form with options on it to "launch" other forms.
You
an also build a custom menu that also does the same thing.

You can also get ms-access to "build" a launch form, or often referred to
as a switchboard form. Just go:

Tools-> Database Utilities->switchboard manager.

If you want to see an example that hides ALL of ms-access interface, and has
some menus (and also a main form with the same function(s) as the menus),
grab my 3rd example here:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

Grab from above the:
"click here for access 2000 merge example with ms-access interface hidden"

Note how the above acutally has a custom menu bar that changes the feagtures
showen when you jump from form to form.
2) I created a DELETE RECORD button
using the wizard. When you click it,
the record behind it goes to the LAST record. I had a look
at the code and as it is my first day I could not
yet work out why this was happening.
Any clues ?

Hum, the wizard code to delete a reocrd looks like:

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

I hate DoMenuItem...they are hard to read.....

To delete a reocrd, I would simply write some code. I would use:

Dim strSql As String

If MsgBox("Delete this reocrd?", vbQuestion + vbYesNoCancel) = vbYes Then
Me.Undo ' undo any pending disk writes...
If IsNull(Me.ID) = False Then
CurrentDb.Execute "delete * from myTable where id = " & Me.ID
Me.Refresh
End If
End If
 
Back
Top