473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SetValue syntax

Looked everywhere for an answer for this, guys. I want to populate a control on a form with a text string using SetValue in a macro.

Here it is:

Item: forms!frmCargoList!Season

Under Expression I've tried:
Summer
'Summer'
"Summer"
="Summer"

and Access keeps thinking it's an item in an automation object. Anybody know how to get it to go through a plain text?

Thanks!
Aug 17 '07 #1
3 6199
damonreid
114 Expert 100+
For text
Expand|Select|Wrap|Line Numbers
  1. DateInformation = "Today's Date: "
  2.         Text31.Caption = DateInformation & Format(Date, "DD/MMM/YY")
For labels
Expand|Select|Wrap|Line Numbers
  1. WeekNumber = Format(Date, "ww")
  2.         Label246.Caption = "Current Week: " & WeekNumber
For a control
Expand|Select|Wrap|Line Numbers
  1.  Me!ControlName = "Text"
Aug 17 '07 #2
Cheers dude! Any idea how to express that in a macro?

Thanks!
Aug 17 '07 #3
Scratch that - I think the field I set up to receive the text was rejecting the string. All working now!
Aug 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Laurie | last post by:
Hi, I need to be able to manipulate field values within a structure using FieldInfo.GetValue and FieldInfo.SetValue, in VB.Nt 2003. The GetValue is working fine and makes it really easy for me...
15
by: Charles Law | last post by:
I have adapted the following code from the MSDN help for PropertyInfo SetValue. In the original code, the structure MyStructure is defined as a class MyProperty, and it works as expected. There is...
2
by: Brent | last post by:
I have variables in a structure loaded into a list box. I thought I could use FieldInfo.SetValue to update the items value when the user clicks on it, but it is not working. .. .. .. Dim fi...
5
by: Dennis | last post by:
I have an array "t" where each element is a structure of type "testing". I want to use the FieldInfo class to set the values of the array element fields. I can read the field properties and...
0
by: Franck | last post by:
Hi, Tryin to fill range with xml data like this in my Excel Addin '1. Add Schema oExcel.ActiveWorkbook.XmlMaps.Add(tmpDs.GetXmlSchema, oRootElement) '2. Map fields...
2
by: cwertman | last post by:
Ok, Im missing something simple here. I have an object o its a person , I want to "blank" out any properties that are a type of a collection The follwoing code will loop through and tell me if...
2
by: Lloyd Dupont | last post by:
I have a color chooser class class ColorPicker : Control { public byte R { get; set; } public byte G { get; set; } public byte B { get; set; } public Color Color { get; set; } } All are...
9
by: FourEyes | last post by:
I've read that Reflection is slow and shouldn't be used when performance is a concern. In my case, performance is definitely a concern, so I was thinking that I could collect the PropertyInfo...
5
by: dig_dug_d | last post by:
Hello, I have been struggling with the SetValue method when trying to use indexed items. I can't figure out what needs to be done to create the "index As Object()" parameter. Juding from the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.