Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 29th, 2005, 07:44 PM
Authorized User
 
Join Date: Feb 2004
Location: , , Canada.
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chacquard
Default passing a value to a field in a unbounded form

Hi,

I have a continuous form (bounded to a query that is a result of several queries) and when I click on a control button, I would like to have the value of the EventID field passed to the field (parmEvent) of the unbounded form.

How can I do that ?

Thank you

Chantal

Reply With Quote
  #2 (permalink)  
Old August 30th, 2005, 07:38 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Dim inEventID As Integer
Dim stLinkCriteria As String

inEventID = Me.EventID

stLinkCriteria = "[EventID] = " & inEventID

This assumes that EventID is a number, and that you are passing the number to itself as EventID in the form or report you are opening with this button. Use stLinkCriteria in the WHERE section of the DoCmd.Open... command.


HTH


mmcdonal
Reply With Quote
  #3 (permalink)  
Old September 5th, 2005, 11:03 AM
Authorized User
 
Join Date: Feb 2004
Location: , , Canada.
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chacquard
Default

Hi,

I did try to use the stLinkCriteria in the "where" section of the docmd.openform... but I get a message because my form is not linked to a query or a table. The "destination" form is some sort of a menu form. I have to select an event in a combobox and click on a control button to print a report, open a form, ...

Now, what I need to do is from a different form, by selecting an event, I want to end up in this "menu" form with the event selected in the combo box.

Let me know if I am not too clear... :)

Chantal



Reply With Quote
  #4 (permalink)  
Old September 7th, 2005, 07:25 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What is the recordsource for the form? Can you be more specific about the controls on the menu form?
Why don't you duplicate the controls from the menu form on your first form? What options does the user have on the menu form that you can't provide on the first form?


mmcdonal
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing unique record from form to form Baconant Beginning VB 6 1 January 2nd, 2008 06:20 PM
getingValue of Unbounded Field from a binding cont Raz Muhammad Visual Studio 2005 1 November 29th, 2005 03:12 PM
How to add search functionality to unbounded form? method Access VBA 4 June 24th, 2005 06:40 AM
Error trying to search for value in unbounded form method Access 0 June 19th, 2005 05:33 PM
Passing Value from main form to Popup Form smartgir Access VBA 0 February 26th, 2004 06:26 PM



All times are GMT -4. The time now is 06:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.