How to "unSecret" a database?


#1

I have a button on a form (from 6 -> X) that opens a visible form on a different database that was previously opened secret, so I can work with some data, then a button on that form executes MakeSecret so it disappears again but is available for lookup reference, etc. In my PanX version, nothing I do will make that form come up. A simple “File>Open” does nothing visible, without error, presumably because it knows that database is already open? Pushing the button, or Run or Step in the procedure window also does nothing. This is the code the button executes:

OpenFile "UserPreferences"
GoForm "UserForm"
Find Username=UserMe

UserMe is a fileglobal that is previously defined, identifying the current user. I tried this with “OpenDatabase” in the first line, but no difference. I put a message statement at the beginning of my procedure and it fires; I put another message statement at the end of it and it never fires. In fact, I put a message statement after each of the 3 lines of code, and it looks like none of the code executes, I only see the initial message. What’s going on?

UPDATE: Using Find & Open, I can “Open Data Sheet Only” so I can work with my data, and I can open my form at this point, but I can’t just “Open Database” and in the long run this isn’t a satisfactory path for my users to have to take.


#2

Thanks. This was reported a few weeks ago, but it hasn’t been fixed yet.


#3

Oh good, at least I’m not crazy. I can continue in the non-user-friendly way until it is. Note that Find & Open, data sheet only, did work for me this time, probably because of your recent fixes to F & O. Is it going to be pretty straightforward to fix?


#4

Not necessarily.

But rereading your post, your procedure can be modified so that it will work now. I would suggest this:

opensecret "UserPreferences"
openform "UserForm","Database","UserPreferences"
find Username=userMe

The first line, opensecret, is just there to make sure that the database is open. If it is already open, it won’t do anything. If you know for sure that “UserPreferences” is already open (maybe you open it automatically when you start), you can omit this line.

The second line opens the form, no matter what the current database is. Panorama X now allows you to open a form in any open database, without having to go to an open window in that database first.


The fact that you were using goform makes me suspect you have multiple forms in UserPreferences that you switch between. That might be a good candidate for using a Tab Panel.


#5

Ironically, no. This is probably my only database with just one form. I inherited lots of other people’s habits when I was handed this database years ago. The added parameters for openform make it very useful. It worked like a charm in this instance.

However, … I went to look up OpenForm in Help, and while the left side of the window (search box, list of articles and commands) was visible as usual, the entire right side that normally explains all this was totally blank, no matter what I clicked on the left. Closed Help, reopened it, still blank. Quit Panorama, started again, back to normal. It reinforces my sense that after Pan has been running a while, and several unsuccessful things have been tried, that it becomes rather unstable and needs to be completely restarted. Case in point (maybe): all that difficulty I had last week (OpenSecret can’t find a file) trying to get a database to open secret in my .Initialize has not been a problem at all today. Maybe it needed an entire weekend off.


#6

A few weeks ago I was very pleased that I literally had Panorama X open for over a week while creating the Import and Export wizard without ever having to close or relaunch it even once, and obviously I was doing a lot of work. By the way, you may be surprised to know that I use the Help constantly as I work. Folks that attended the seminars can attest to that.

I’m not saying that your sense is right or wrong, just providing an anecdote.


#7

I long held this view about Pan6 and I think it’s true for PanX as well. Jim, you probably don’t make as many mistakes or generate as many error messages as we do.


#8

The more interesting moments I’ve had as a database designer has been after I’ve released a new version to my clients. I would then sit behind them and watch them do their work as I explained the new features. It was a regular occurrence that I’d give them an instruction and I would then find myself swallowing my words but thinking, ‘Why o why o why would you do that?’ Every user has their own way to do things and it was always entertaining to watch the way that people worked. I’d design it expecting one thing, but no, they would do things that I’d never expect someone to do. Obviously it gave me many things to note and to change when I got back to my office as I just didn’t imagine what I’d seen. And of course, my design would have had a hole or two in it based on their mindset of how things should be done. I never tried to change people but instead accommodated their natural way to think.

Robert Ameeti


#9

That can be a hard thing for developers to learn, but it’s right on. Funny that developers may expect their users to be meticulous about reading all the documentation, but they tend to not do it themselves. Years ago I was a programmer at another place, writing a lot of software for internal use by engineers and technicians. I would also write the instructions for use, which turned out to have some invaluable side effects. As I wrote “in order to do this, do this then this …” and I would perform those steps as I wrote, and often discover that this sequence didn’t work after all, and I would correct it on the spot (before release). Or realize that these steps were far too complex which would lead me to program it more efficiently. Or, like Robert, watch people use it and realize that my expectations about work flow were all wet. In the case of Panorama, I am a user and I fill all of those roles - I am my own feedback loop. Programming is an interesting profession…


#10

Here is one of my favorite quotes:

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning."
Rick Cook