Forms rather than switchboard

KelMcc

Rock n' Roll Paddy
Local time
Today, 03:47
Joined
May 23, 2002
Messages
97
OK, instead of using a switchboard to for the user interface of my DB, I'd like to use a form w/ command buttons that then take the user to the areas they need to go to.

I'm doing this because I don't like the default settings of the switchboard and find it difficult to make changes to it w/out screwing things up.

I'm 100% confident I can do this w/ forms. The problem is the form I'm using as the "introduction" (the first thing that pops up when the user enters the DB) comes up with (and I'm sorry I don't know the exact terms) a "frame". Basically, it has that "frame" column at the left w/ the little > arrow at the top left and it has the "Record 1 or 1" message at the bottom.

How do I get rid of this "frame"? There are only 2 buttons on the form, there are no combo, list, or text boxes. The funny thing is, one of the subsequent forms that this initial form takes you to.... it DOESN'T have the "frames"... I've looked at the properties of both and can't figure out what I'm missing/doing wrong.
 
Couple of Format Properties to look at

Record Selector is the Grey-bar-with-arrow.
Navigation Buttons is the 1 of 1.

I think that'll fix the issues you're talking about - on my 'switchboard' forms I also set Default View to Single Form, Views Allowed to Form, an appropriate Caption, Scroll Bars to Neither, and Auto Center to Yes. Usually if it's supposed to be a permanent switchboard form I also remove the Min/Max, Close, and Control Box buttons.
 
w00t!!! David you are so teh win! Sorry, if you don't play online games much that'll seem stupid, but its a compliment. :)

Since, yet again, you have so ably helped me, be prepared to be further exploited! Ready?

All that you said was helpful and your explanations even anticipated some, but not all, of my follow up questions. :)

Here 'tis...........
*When I'm using forms as my switchboard, how do I get a form to call another form but in add mode only? I'm figuring its on the "Event" tab somewhere, like on exit, then it'll need some code....

Thanks David!
 
I never have time to play online games...

Yahoo!Pool and Civilization are about the only things I can delve into (and currently Monster Rancher for stress relief).

I'm STRONGLY resisting the urge to get an X-Box and play Morrowwind....dang that game is nice.:cool:

Anyway, look up the OpenForm Method in VBA help (have to have a VBA window open, or drill down to it through the OpenForm Action help file). It details in there how to open a form in AddOnly mode, overriding the basic settings (DataEntry).
 
I tried and didn't get very far.... Unfortunately, that stuff is hard reading for me, so maybe I did find the right instructions, but didn't get it...

Anyway, here's the code I'm trying to change so that the called form opens in add mode:
-----
Private Sub ISIFAdd_Click()
On Error GoTo Err_ISIFAdd_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "ISIF Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_ISIFAdd_Click:
Exit Sub

Err_ISIFAdd_Click:
MsgBox Err.Description
Resume Exit_ISIFAdd_Click

End Sub
------

All I could figure doing was adding the suffix "Add" to the "OpenForm" bit, so it was "OpenFormAdd", but that just got me an error: "Object doesn't support this property or method."
 
All those commas are options you're currently letting go to default. The one after the WHERE clause specifies the Data Mode.

Code:
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
 
David, worked like a charm. :) You kick *ss my friend! Do you take names too? lol

Anyway, I'd say "take you to a Royals game" but I know you'd see that as a punishment, rather than a reward. :)
 
Oh, here's another one for you, David. The "Navigation Buttons", say my form returns 6 matches, so the NB numbers 1 thru 6, and starts with 1. Anyway to get it to start w/ 6 and go down to 1?
 
Not exactly..

You can either:
a) reorder the records so the 6th one currently is #1, and vice versa. This should happen in the query that your form is built on.
b) Use DoCmd.GoToRecord , , acLast to jump to the last record when you start the form. However you'll still have to use the [<] button to descend in numbers.
 
That DoCmd worked great! Thanks. New problem. :) The form I want to start w/ #6, I use as a subform. So, when I'm in masterrecord 1, subrecord 6, then go to masterrecord 2, the subrecord(form) seems to ignore the DoCmd and the subrecord(form) for the next masterrecord starts w/ 1.... Does that make sense?
 
Got it! I put the DoCmd as a sub of the event of entering the subform! YEAH!

---
Private Sub ISIF_Comment_sub_Enter()
DoCmd.GoToRecord , , acLast
End Sub
---
 
1 problem with that. :(

If there are no records for that subform, I get "run-time error 2015, you can't get to the specified record"....

Do I need an "if" statement for those circumstances where this is no record?
 
Fixed! Sort of... basically, made the form be edit only (which is how it'll be used), so since its not looking to add any new forms, there is never the chance to generate the error....

Anyway... :)
 
Re: Couple of Format Properties to look at

David R said:
Record Selector is the Grey-bar-with-arrow.
Navigation Buttons is the 1 of 1.

I think that'll fix the issues you're talking about - on my 'switchboard' forms I also set Default View to Single Form, Views Allowed to Form, an appropriate Caption, Scroll Bars to Neither, and Auto Center to Yes. Usually if it's supposed to be a permanent switchboard form I also remove the Min/Max, Close, and Control Box buttons.

Also, I have gotten into the habit of writing a macro that has only the command to Maximize in it. Then, I have that macro run in the On Open form property. That way, the form will ALWAYS open maxxed.

((I learned that on this forum))

Tom
 
Re: Re: Couple of Format Properties to look at

vangogh228 said:


Also, I have gotten into the habit of writing a macro that has only the command to Maximize in it. Then, I have that macro run in the On Open form property. That way, the form will ALWAYS open maxxed.

((I learned that on this forum))

Tom

I usually just use DoCmd.Maximize in the Open Event, but I never worked with Macros so I prefer the code route...whatever works for ya...

(Delayed reaction, I know. I'm starting to get my own posts in searches...)
David R
 

Users who are viewing this thread

Back
Top Bottom