Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 19th, 2005, 03:17 PM
EACE EACE is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 2 EACE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 10 sec
Reputation Power: 0
Unhappy Can't Reference a form!field value contained in a string variable

New to Forum:
1) Have successfully passed the name of a field to an activeX control procedure through Open.Args fully qualified (e.g. "Forms!frm_maintain_account.review_date") and stored it in String variable called stFormField (tried DIM with control and object could not get it to work either).
2) Problem is that when I try using
stFormField = date <==(it puts the actual date in)
or
Set stFormField = date
I get object related errors? If I use the full reference to source form instead of stFormField it works... e.g.
Forms!frm_maintain_account.review_date = date
but then I will not be able to class...
Help would be much appreciated .... EACE

Reply With Quote
  #2  
Old August 19th, 2005, 05:09 PM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Are you passing the value of "Forms!frm_maintain_account.review_date" or the name of the control? Your post indicated you are passing the name of a field and I assume you meant control. If so you will need to add the .Name to specify the name of the control not the value.

stFormField = Forms!frm_maintain_account.review_date.Name

Reply With Quote
  #3  
Old August 24th, 2005, 05:37 PM
EACE EACE is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 2 EACE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 10 sec
Reputation Power: 0
Quote:
Originally Posted by lwells
Are you passing the value of "Forms!frm_maintain_account.review_date" or the name of the control? Your post indicated you are passing the name of a field and I assume you meant control. If so you will need to add the .Name to specify the name of the control not the value.

stFormField = Forms!frm_maintain_account.review_date.Name
Thanks. Not exactly the answer, but it put me on the right Path and solved the problem.
EACE

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Can't Reference a form!field value contained in a string variable


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT