Connecting Tech Pros Worldwide Help | Site Map

can one pass more than 1 var to a form via openargs?

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 24th, 2006, 01:35 AM
jim Bob
Guest
 
Posts: n/a
Default can one pass more than 1 var to a form via openargs?

Just a quick question.
I have a docmd in the form of
DoCmd.OpenForm "frm_SearchResults", acNormal, , , , acWindowNormal,
Me.lstResults.Value

I currently pass Me.lstResults.value through and use this value etc
etc.. Is it possible to pass more than one variable?

Cheers.



*** Sent via Developersdex http://www.developersdex.com ***

  #2  
Old January 24th, 2006, 01:45 AM
Larry Linson
Guest
 
Posts: n/a
Default Re: can one pass more than 1 var to a form via openargs?

OpenArgs, by definition, is a text string. You can separate items in that
string with appropriate punctuation, and separate them in code in the Open
event of the newly opened Form (or, with Access 2003, Report). Check Help
for the Split function for easy separation.

Larry Linson
Microsoft Access MVP

"jim Bob" <fromnz@gmail.com> wrote in message
news:bdgBf.76$H_2.11967@news.uswest.net...[color=blue]
> Just a quick question.
> I have a docmd in the form of
> DoCmd.OpenForm "frm_SearchResults", acNormal, , , , acWindowNormal,
> Me.lstResults.Value
>
> I currently pass Me.lstResults.value through and use this value etc
> etc.. Is it possible to pass more than one variable?
>
> Cheers.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***[/color]


  #3  
Old January 24th, 2006, 01:45 AM
Mal Reeve
Guest
 
Posts: n/a
Default Re: can one pass more than 1 var to a form via openargs?

When I need to do this I build up a string of the variables with a ";"
character between each one.
Then in the opened form I take the string apart for the segment I need...and
if necessary even convert back to a number etc.

Perhaps someone else will respond with a better solution - but this works
for me.
Mal.

"jim Bob" <fromnz@gmail.com> wrote in message
news:bdgBf.76$H_2.11967@news.uswest.net...[color=blue]
> Just a quick question.
> I have a docmd in the form of
> DoCmd.OpenForm "frm_SearchResults", acNormal, , , , acWindowNormal,
> Me.lstResults.Value
>
> I currently pass Me.lstResults.value through and use this value etc
> etc.. Is it possible to pass more than one variable?
>
> Cheers.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***[/color]


  #4  
Old January 24th, 2006, 02:45 AM
jim Bob
Guest
 
Posts: n/a
Default Re: can one pass more than 1 var to a form via openargs?

Yep, I've got that down pact. Thanks.

The form I open up actually gets its data from a query.
Therefore I get the var from openargs and read it like so:
([forms]![frm_SearchCandidates].[qmyList].[value])

I do not want to limit the query to get the var from only the
frm_SearchCandidate form.

Would a function be the way to go? I tried using an OR statement but
that didn't quite work the way I wanted it to.

THanks.

*** Sent via Developersdex http://www.developersdex.com ***
  #5  
Old January 24th, 2006, 05:05 AM
Steve Jorgensen
Guest
 
Posts: n/a
Default Re: can one pass more than 1 var to a form via openargs?

As has been made clear, multiple values can be passed through a
delimited string, however that gets really messy really fast. We had a
long thread a while back discussing various ways around this problem,
mostly involving either witing to the form's properties after opening it
or placing objects into some sort of temporary holding before opening
the form, and having the form retrieve the data when it opens.

jim Bob wrote:[color=blue]
> Just a quick question.
> I have a docmd in the form of
> DoCmd.OpenForm "frm_SearchResults", acNormal, , , , acWindowNormal,
> Me.lstResults.Value
>
> I currently pass Me.lstResults.value through and use this value etc
> etc.. Is it possible to pass more than one variable?
>
> Cheers.[/color]
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.