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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Opening forms



 
 
Thread Tools Display Modes
  #11  
Old February 14th, 2006, 12:14 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Opening forms

Hello,

this works!

thank you very much for your help,

Steve



"Klatuu" wrote in message
...
Here is what you need:

Dim strSelectForm As String
Dim strDocName As String

strSelectForm = Me.cmbKategorija & Me.cmbVrstaKabela
Select Case strSelectForm
Case "5eUTP"
strDocName = "Form1"
Case "5eFTP"
strDocName = "Form2"
Case "5eSTP"
strDocName = "Form3"
Case "5eSSTP"
strDocName = "Form4"
Case "6UTP"
strDocName = "Form5"
Case "6FTP"
strDocName = "Form6"
Case "6STP"
strDocName = "Form7"
Case "6SSTP"
strDocName = "Form8"
End select

Docmd.OpenForm strDocName

"Steve" wrote:

Hello, I have tried like this, but I have Eror - control does not have
focus,

can you tell me please where I do wrong,

Private Sub cmdOdlazniPanel_Click()

Dim stDocName As String
Dim stLinkCriteria As String


Set db = CurrentDb

txtKategorija.SetFocus
txtVrstaKabela.SetFocus


Select Case txtKategorija.Text And txtVrstaKabela.Text

Case txtKategorija = "5e" And txtVrstaKabela = "UTP"

stDocName = "frmPanelUTP5e"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Case txtKategorija = "6" And txtVrstaKabela = "UTP"
stDocName = "frmPanelUTP6"
DoCmd.OpenForm stDocName, , , stLinkCriteria


End Select

End Sub

"Steve" wrote in message
...
Hello Jeff,

I have explained situation what I want to acomplish:

in cmbKategorija I have 2 values (text): 5e and 6,
in cmbVrstaKabela I have 4 values (text):UTP, FTP,STP and SSTP
there is 8 possible combinations (I have created 8 forms).Now, when I
have
for example, in cmbKategorija value 6 and in cmbVrstaKabela value FTP,
when I press CommandButton (cmdChoose) I want to be opened Form6 (for
example).
can you tell me please how does code looks like?

thank you


"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in
message
...
Steve

(and if you'd rather not, consider creating a command button and
inserting a
Select Case statement to handle the different combinations)

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor

"Steve" wrote in message
...
Hello everyone,

I have a problem with opening forms.I have situation with 8 forms
(small
ones!) which must be open based on values in ComboBox1 and ComboBox2.

imagin situation: if the cmbOne=5e and cmbTwo=UTP open Form1,
if the cmbOne=5e and cmbTwo=FTP open Form2,
if the cmbOne=6 and cmbTwo=UTP open Form3 (I have 8 forms),

How can I do it?

thanks












  #12  
Old February 21st, 2006, 10:59 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Opening forms

"Klatuu" wrote

I certainly understand. It did seem an odd way to go.


What seems odd to me is that an experienced Access developer like you would
simply give a solution without addressing the "apparent oddity" of the
desired solution, and suggesting, as Jeff has done, that if the poster would
explain what he has and what he is trying to accomplish, someone might be
able to suggest a simpler or more effective solution.

Larry


 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
printing forms Kagiso General Discussion 2 December 14th, 2005 10:21 PM
printing only forms Kagiso General Discussion 1 December 14th, 2005 04:32 PM
Opening several forms at one time Barth Wilsey Using Forms 1 September 17th, 2005 02:07 PM
odd question (abt opening random forms) _Bigred Using Forms 1 September 11th, 2005 04:11 AM
Error opening Forms - Module Not Found Glen Using Forms 1 June 7th, 2004 07:42 AM


All times are GMT +1. The time now is 06:54 PM.


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