A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

form selection



 
 
Thread Tools Display Modes
  #1  
Old June 8th, 2004, 02:34 PM
Lapchien
external usenet poster
 
Posts: n/a
Default form selection

Struggling with this (still!) - we have a db with several forms. Lets call
them frm_A, frm_B and frm_C.

The front screen (main form) of the db will prompt for an 'account number'
(stored in another table). If the user enters, say 5555, then frm_A will
open. If they enter 9999 frm_B will open, etc.

My 'account' table has 2 fields, Code, and Who (account number and name).
I've bound this table to the startup form.

How do I get the forms to open from account codes entered?

Thank You
Lap


  #2  
Old June 8th, 2004, 03:18 PM
Lapchien
external usenet poster
 
Posts: n/a
Default form selection

A bit further on -

Private Sub Command2_Click()
DoCmd.OpenForm Me!Text9
End Sub

Text9 = account name (and form name).

However, if the user selects an acount number that is not in the table can I
have a 'friendly' error, and not just an End/Debug message?

Thanks


"Lapchien" wrote in message
...
Struggling with this (still!) - we have a db with several forms. Lets call
them frm_A, frm_B and frm_C.

The front screen (main form) of the db will prompt for an 'account number'
(stored in another table). If the user enters, say 5555, then frm_A will
open. If they enter 9999 frm_B will open, etc.

My 'account' table has 2 fields, Code, and Who (account number and name).
I've bound this table to the startup form.

How do I get the forms to open from account codes entered?

Thank You
Lap




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.