473,839 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

If Hidden BackEnd BE not found then supress error revealing its location?

Hello

Split DB (FE & BE) Linked. FE compiled to MDE.

For security reasons, I have hidden the BackEnd. However, If the
network is down or the FE can't find the Backend, then an Access Error
reports exactly where the Backend is. This blows my attempt at hidding
the Backend file. I have tried to use the DIR() statement to look for
the BE in my FormOpen of my 1st form but it seems to be ignored.

Now do I detect ,right away, if the BackEnd is found so that I can
close down the app without it revealing where the BE file is hidden ?

Thanks Greg

Jul 14 '06
17 1939
Solved The Problem!

I always thought the AutoExec macro was the first thing executed, but I
guess I was wrong. The Form specified in the Options->StartUp did
execute first. So, as suggested, I created a blank unbound form and
called it form there. In this form I check for the BE. If not found,
then I report the error and then close the database. If found, I open
my original Menu form, and close the blank form and I'm on my way.
Worked Great!

Private Sub Form_Open(Cance l As Integer) 'The OnOpen event of my
form "F-START"
If Len(Dir("MyFile PathandFile")) = 0 Then
MsgBox "BackEnd DataBase File Missing" & vbCrLf & vbCrLf _
& "The FileServer May Be Down?", vbExclamation,
"Monitoring Devices"
DoCmd.Quit
End If
'BE was found so continue
DoCmd.OpenForm "F-MENU" 'Run my menu form.
DoCmd.Close acForm, "F-START" 'Close the unbound form.
End Sub
ThankYou Rick and Ron!
Greg




paii, Ron wrote:
A new form would be my choice because the Dir() function can fail if the
path is invalid, which would crash your application if run from a macro.

"paii, Ron" <pa**@packairin c.comwrote in message
news:sc******** *************** *******@athenet .net...
You can use the autoexec macro, or create a new startup form that opens
the
original after checking for the BE.

<Ap******@gmail .comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Ron
>
Sorry! I do understand what you mean!
However, in my startup forms record source property contains a table I
need to use.
Is there a way around this, like calling it form code. Or do I need to
use the autoexec macro, or load a phantom form before my startup form ?
Any suggestions?
>
Greg
>
>
>
Ap******@gmail. com wrote:
Ron

I don't understand what you mean. I do not see any options in the
"Startup" allowing me to check for the BE. What I want to do is look
for the BE when the FE starts. I figured the place to do this is the
Form_Open of the FE. If I make this work, then I'll know if the BE
exists, or is gone. Then I can shut my app down. I DoNot want the FE
reporting that the BE is missing, and then displaying its path. For
security reasons, this will reveal my hidden backend. Not Good.

Thanks for Responding




paii, Ron wrote:
You need to change the startup in your FE to check for the BE before
opening
any forms or reports that access BE data.
>
<Ap******@gmail .comwrote in message
news:11******** *************@3 5g2000cwc.googl egroups.com...
Hello

Split DB (FE & BE) Linked. FE compiled to MDE.

For security reasons, I have hidden the BackEnd. However, If the
network is down or the FE can't find the Backend, then an Access
Error
reports exactly where the Backend is. This blows my attempt at
hidding
the Backend file. I have tried to use the DIR() statement to look
for
the BE in my FormOpen of my 1st form but it seems to be ignored.

Now do I detect ,right away, if the BackEnd is found so that I can
close down the app without it revealing where the BE file is
hidden
?

Thanks Greg

>
Jul 14 '06 #11
Ap******@gmail. com wrote:
Solved The Problem!

I always thought the AutoExec macro was the first thing executed, but
I guess I was wrong. The Form specified in the Options->StartUp did
execute first. [snip]
Yeah I just discovered that myself several months ago. Seems like the AutoExec
should come first to me, but...

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 14 '06 #12
"Rick Brandt" <ri*********@ho tmail.comwrote in
news:Sg******** ***********@new ssvr14.news.pro digy.com:
Ap******@gmail. com wrote:
>Solved The Problem!

I always thought the AutoExec macro was the first thing executed,
but I guess I was wrong. The Form specified in the
Options->StartUp did execute first. [snip]

Yeah I just discovered that myself several months ago. Seems like
the AutoExec should come first to me, but...
why would anyone use both an Autoexec and a startup form?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 15 '06 #13
David W. Fenton wrote:
"Rick Brandt" <ri*********@ho tmail.comwrote in
news:Sg******** ***********@new ssvr14.news.pro digy.com:
Ap******@gmail. com wrote:
Solved The Problem!
>
I always thought the AutoExec macro was the first thing executed,
but I guess I was wrong. The Form specified in the
Options->StartUp did execute first. [snip]
Yeah I just discovered that myself several months ago. Seems like
the AutoExec should come first to me, but...

why would anyone use both an Autoexec and a startup form?
One would never "need" to, but I had a utility app that used AutoExec that I
later added a startup form to. Somewhat later I discovered a bug caused by the
fact that the startup form's open code was running before the AutoExec call
which was not what I expected.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 15 '06 #14
David W. Fenton wrote:
"Rick Brandt" <ri*********@ho tmail.comwrote in
news:Sg******** ***********@new ssvr14.news.pro digy.com:
Ap******@gmail. com wrote:
Solved The Problem!

I always thought the AutoExec macro was the first thing executed,
but I guess I was wrong. The Form specified in the
Options->StartUp did execute first. [snip]
Yeah I just discovered that myself several months ago. Seems like
the AutoExec should come first to me, but...

why would anyone use both an Autoexec and a startup form?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
In my early attempts, modification of Access 2007's Ribbon must be
initiated by firing an autoexec macro; a start up form seems too late.
So this is the first time I have used an autoexec macro. But I may
still want a visible startup form to allow or require the user to do
something.
Of course, this is a pretty obscure circumstance and it's entirely
possible that someone will point out a way to modify the ribbon without
using an autoexec macro.

Jul 15 '06 #15
Lyle Fairfield wrote:
In my early attempts, modification of Access 2007's Ribbon must be
initiated by firing an autoexec macro; a start up form seems too late.
[snip]

Interesting. Has the order been reversed in 2007 so that the AutoExec now fires
before the startup form or is there just some requirement that ribbon mods must
be done via macro (yuck)?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 15 '06 #16
Rick Brandt wrote:
Lyle Fairfield wrote:
In my early attempts, modification of Access 2007's Ribbon must be
initiated by firing an autoexec macro; a start up form seems too late.
[snip]

Interesting. Has the order been reversed in 2007 so that the AutoExec now fires
before the startup form or is there just some requirement that ribbon mods must
be done via macro (yuck)?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
http://blogs.msdn.com/access/archive...13/664757.aspx

has some information about how to customize the ribbon. I'm guessing
that the VBA callback functions have to be in a Macro.

Maybe use VBA as an XML editor :-).

James A. Fortune
CD********@Fort uneJames.com

Jul 16 '06 #17
Rick Brandt wrote:
Lyle Fairfield wrote:
In my early attempts, modification of Access 2007's Ribbon must be
initiated by firing an autoexec macro; a start up form seems too late.
[snip]

Interesting. Has the order been reversed in 2007 so that the AutoExec now fires
before the startup form or is there just some requirement that ribbon mods must
be done via macro (yuck)?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
I think I have mispoken. TTBOMK one uses the AutoExec Macro to run the
code that modifies the Ribbon .

An example that does nothing but hide the ribbon is:

The AutoExec Macro is

Command:RunCode
Argument: temp()

The Code is
Public Function temp()
Dim r As DAO.Recordset
Set r = DBEngine(0)(0). OpenRecordset(" Table1")
Application.Loa dCustomUI r.Collect(1), r.Collect(2)
Set r = Nothing
End Function

In Table 1 is one record with Fields:

ID:1
RibbonName:Hide Ribbon
RibbonXML:
<customUI xmlns="http://schemas.microso ft.com/office/2006/01/customui">

<ribbon startFromScratc h="true">

</ribbon>

</customUI>

r.Collect(1) then is HideRibbon
and
r.Collect(2) is
<customUI xmlns="http://schemas.microso ft.com/office/2006/01/customui">
<ribbon startFromScratc h="true">
</ribbon>
</customUI>

As for a start up form, my GUESS is the one will open up one's start up
form by doing a

DoCmd.OpenForm at the end of the code called by the macro.

Sounds clumsy ...yes?

Jul 16 '06 #18

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

Similar topics

2
7551
by: Andrew | last post by:
I have a <div> section of text in my page that I want to make visible via an input check box associated with an OnClick javascript. I can do this OK but the problem is that the space for the hidden text is reserved on the page (i.e. thare is a gap). The user clicks the button to make the text visible or not visible. What I really want is for the page to expand (open up) to reveal the text if the user checks the box and contracts again if...
3
2104
by: DD | last post by:
Hi I have a split database, that is packaged and used in a runtime enviroment. I want to make it easier for the user, a button on the frontend "Export Backend" They can click on the button then search for the backend and then save the backend to a CD or Floppy.
1
4019
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the live databases on the network. Is there a way, via code, when I get back in-house from being on the road to click a button, and select the backends I want to link to? I would want to delete all the current links and link to the "live"
351
13183
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and do) occur in any language. These assumptions are generally made because of familiarity with the language. As a non-code example, consider the idea that the faulty code is written by blackguards bent on foulling the language. The term...
4
1426
by: Mark | last post by:
Hi All, I created a database for a friend a few months ago which has been working fine. However, he now wants a few changes implemented to accommodate his growing needs. When I gave him the database, I split it in anticipation of this so that I could give him a replacement fromtend without affecting his existing data. My problem is that one of the changes he has asked for requires one of the tables altering. My plan was to run code the...
13
4923
by: rdemyan via AccessMonster.com | last post by:
My front-end code manually links to the backend file. I was wondering what stops Access from linking to the system tables in the backend file. Is it just by virtue that they are hidden? This has recently come up because I've been playing around with converting my front end to A2003 format. At some point, I had a corruption issue with a system file MSStorage something. Access kept saying it couldn't find it. When I looked in the db...
1
2199
by: pemigh | last post by:
I'm almost done with an application, and trying to lock it down tightly. But I still want users to be able to point to a new location for the data file. The code below fires off to detect and address the problem of a moved/renamed data file. The problem: WITHOUT the "tdf.Attributes = dbHiddenObject" line, my previously hidden tables are now visible. (Not that the users will normally have the chance to see them, hidden or not.)
3
2379
by: Fast Eddie | last post by:
Hi, We have an old MS Access frontend application which has a SQL Server backend. Recently the SQL Server database used as the backend was moved to a new server. I have updated the server location the ODBC DSN and it connects fine but when trying to use the MS Access application it is still pointing to the old server for some reason. I thought it would only be a matter of changing the server location in the ODBC but evidently the backend...
6
1933
by: bg_ie | last post by:
Hi, My company's backend is located at a location with a long address, something like - //our_servers/server_number_one/our_department/our_devision/ our_results/our_databases/backend.be I have tested the very same backend on another server with a sort path location at it works fine, but at the location above it is extremely
0
9855
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10908
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10587
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10649
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10295
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9426
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7018
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5682
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4487
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.