 |
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

June 7th, 2006, 04:25 AM
|
Authorized User
|
|
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Batch File
Hi there. I am hopefully going to be using a batch file to automatically update my database with new records being generated on another machine. These updates will be sent by email.
Is there a way that i can have the batch file search for an update at start up and install these updates without relying on the user to upload the updates?
Im just gauging interest to see if this is possible. I have a basic batch file which searches for the appropriate front end to be used and i will update this accordingly.
Thank You
Allan
|

June 7th, 2006, 05:58 AM
|
Authorized User
|
|
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry. The updates are saved as a table.
|

June 7th, 2006, 06:50 AM
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
You don't need a batch file. I do this with a splash form before my main form opens in some databases. The on load event of the splash file goes out and looks for a text file, and if there is anything in the text file it pulls it into the database, then overwrites the text file so that no dupes are made. You can save the text file to an archive folder before you overwrite it in case there are mistakes.
Then the splash file closes itself and opens the main form.
Is this what you are looking for? How are the updates packaged?
mmcdonal
|

June 7th, 2006, 06:58 AM
|
Authorized User
|
|
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yeah, this could be basically what im looking for. the updates are packaged in a table, and given a .fif tag to comly with out system. Right, off to find out how to write a splash file :D never heard of this before
|

June 7th, 2006, 08:59 AM
|
Authorized User
|
|
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
So do i basically create another form, Change this form to the main form. Add the timer and allow sufficient time to update, once it has updated route it back to the original form.
|

June 7th, 2006, 09:02 AM
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
No, just create a splash form, have it load as the form loaded when the app opens (start up options) then put these actions on the splash form's on load event:
Check for file
Update database if found
Close splash form
Open main form
No need for timers since the process will not move on to the close and open events until the update event is finished.
mmcdonal
|

June 7th, 2006, 10:35 AM
|
Authorized User
|
|
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Micheal, sorry to be a PITA :D When i try to save the splash file it tells me that it is not in a valid format. I read a tutorial and it tells me to save it as formname.cs What file format should i put it in.
Thanks again
Allan
|

June 7th, 2006, 10:45 AM
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Sorry, what I meant was, create a form in your Access database. This would be "frmSplash"
Then set your start up options to open this form first.
This form has on OnLoad event, which you use to update the database, close the splash form, and open your main form.
So it is all done within Access.
mmcdonal
|

June 8th, 2006, 03:36 AM
|
Authorized User
|
|
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Woo Hoo. I got the splash screen showing. But its got a border round it. I cant find the actual values to change this in the form design.
Here is the basic layout without any of the looking for update procedures included
Private Sub Form_Load()
Sub Main()
' Show the splash form
Form_Splash.Show
' Load the main form
Load Form_Main_Menu
' Load any other forms you may have that you need
' Show the main form
Form_Main_Menu.Show
' Remove the splash form from the memory
Unload frmSplash
End Sub
Allan
|

June 8th, 2006, 06:30 AM
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
I am not sure why you did it this way, but oh well. Go to the properties dialog box for the form and change the border style to Thin, or no border.
mmcdonal
|
|
 |