473,503 Members | 5,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with eval

I cannot seem to create an evaluate string which will set/clear a
control source. Yet it I do it directly with code it works.

This is needed since the user will be naming/deleteing the fields on a
massive form. I don't know the name of the field until the user
creates the field and names it. This ia also done on three subforms.
All fields will stay on the form be to be reused.
This is an example of a field the the user want to delete
dim ThisForm as string
dim ThisField as String
dim StrEval as gtring

ThisForm = "Forms!frmExpenseSub!" ' depending what form the user is on
ThisField = "e122222" ' depending on what field the user
deletes

Open the form in design view through code

strEval = "ThisForm & ThisField & ".ControlSource = ''" ' Clear the
control source
Eval(strEval) ' Now Do it
' No effect above
yet in the debug window
?strEval
Forms!frmExpensSub!e122222.ControlSource = ""
then run it - works

Thanks

Nov 13 '05 #1
1 1513
In article <11**********************@g43g2000cwa.googlegroups .com>,
"Barry" <ba**********@yahoo.com> wrote:
strEval = "ThisForm & ThisField & ".ControlSource = ''" ' Clear the
control source
Eval(strEval) ' Now Do it


At least in Access 97, where I work, I believe EVAL needs to be given a
function call, not an arbitrary VBA statement.

-Dave

--
"Sometimes what seems to be enough smoke to guarantee a robust
fire is actually just a cloud of dust from a passing bandwagon."
- Daniel Dennett
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3816
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
1
3279
by: Darren Clark | last post by:
I need to be able to send through 2 peices of infomraiton in the commandArgument property of a image button... <asp:imagebutton CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+...
6
2099
by: Roebie | last post by:
Hi everyone, I'm having some weird problem with evaluating the continue statement. Within a for loop I'm trying to evaluate a string (generated somewhere earlier) which basically has the continue...
2
3205
by: tshad | last post by:
This is related to my other Hiding datalistitems problem that I can't seem to solve. I have tried different methods which all seem to work only partially. I decided to try to use a User...
7
3325
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid,...
4
1933
by: Antonio Carpentieri | last post by:
Hi all, in my previous post I've wrong typed some tems.. this is the corrected post. in a aspx page I have a repeater like this: <asp:repeater id=repeaterResults runat="server"...
1
1698
by: Frank | last post by:
I am having a problem with using a repeater control. I have no idea what I am doing wrong. It compiles but nothing displays. Can anyone help? Here is the code: ASPX File: <%@ Page...
18
3300
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
2
2940
by: DC | last post by:
The Code <%@ import namespace="System" %> <%@ import namespace="System.Web" %> <%@ import namespace="System.Web.UI" %> <%@ import namespace="System.Web.UI.HtmlControls" %> <%@ import...
0
4083
by: uncensored | last post by:
Hello everyone, I'm fairly new at .Net and I have a repeater inside a repeater problem. I will attach my code to this message but basically what I am able to tell when I run my page it tells me...
0
7188
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
7063
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
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5558
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
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.