Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need help with syntax ....

Posted on 1999-07-12
7
Medium Priority
?
252 Views
Last Modified: 2008-03-03
Here's some sample code:
 stLinkCriteria = "[ClientNo]=" & "'" & Me![Combo0] & "'"
 Where2Go = "frmSampleForm"
 DoCmd.OpenForm Where2Go, , , stLinkCriteria

Too this I would like to add WindowMode of either acWindowNormal or acHidden. I can't, for the life of me, figure out how to add the comma and WindowMode to the stLinkCriteria variable's definition.
0
Comment
Question by:ronallard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 7

Expert Comment

by:Dedushka
ID: 1999841
Just use:
DoCmd.OpenForm Where2Go,acNormal , , stLinkCriteria

0
 
LVL 7

Expert Comment

by:Dedushka
ID: 1999842
This is more correct:
DoCmd.OpenForm Where2Go, acNormal, , stLinkCriteria


0
 

Author Comment

by:ronallard
ID: 1999843
You must have missed the drift of my request. WindowMode is the last option in the string to be passed. Sometimes I want to open this form Hidden. I'm looking for a way to adjust this with the setting of a variable. I thought I would just tack in onto the stLinkCriteria variable but can't figure out the syntax to get it resolved properlyl.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 7

Expert Comment

by:Dedushka
ID: 1999844
ronallard,
you can't include mode unto stLinkCriteria, you should use a separate variable for Window Mode:

Dim intWindowMode As Integer
Dim boolHidden As Boolean

'...
' somewhere boolHidden = True/False, let it be False
boolHidden = False
'...

If boolHidden = True Then
    intWindowMode = acHidden
Else
    intWindowMode = acWindowNormal
End If

DoCmd.OpenForm Where2Go, , , stLinkCriteris, , intWindowMode

Try this and let me know,
Dedushka

0
 

Author Comment

by:ronallard
ID: 1999845
This works great!  Thanks so much. could you post as an answer so I can close this?
0
 
LVL 7

Accepted Solution

by:
Dedushka earned 200 total points
ID: 1999846
ronallard,
you can't include mode unto stLinkCriteria, you should use a separate variable for Window Mode:

Dim intWindowMode As Integer
Dim boolHidden As Boolean

'...
' somewhere boolHidden = True/False, let it be False
boolHidden = False
'...

If boolHidden = True Then
    intWindowMode = acHidden
Else
    intWindowMode = acWindowNormal
End If

DoCmd.OpenForm Where2Go, , , stLinkCriteris, , intWindowMode

Try this and let me know,
Dedushka


0
 

Author Comment

by:ronallard
ID: 1999847
Thanks so much for the help!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question