473,473 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Use of with

Hi,

The following works just fine
With Forms!DataInput
!Cwk.visible = True etc ....................

But
Dim StDocName as string
StDocName = "DataInput"
With Forms!StDocName
!Cwk.vis etc....

Fails

I've tried bracket and all sort to no avail.

Thanks in advance
Nov 13 '05 #1
2 1136
Try without any bang or dot, i.e.:
With Forms(stDocName)

That's equivalant to:
With Forms("DataInput")

The brackets refer to the member of the Forms collection.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John M" <jo**@jmawer.demon.co.uk> wrote in message
news:cl*******************@news.demon.co.uk...

The following works just fine
With Forms!DataInput
!Cwk.visible = True etc ....................

But
Dim StDocName as string
StDocName = "DataInput"
With Forms!StDocName
!Cwk.vis etc....

Fails

I've tried bracket and all sort to no avail.

Thanks in advance

Nov 13 '05 #2
John M wrote:
Hi,

The following works just fine
With Forms!DataInput
!Cwk.visible = True etc ....................

But
Dim StDocName as string
StDocName = "DataInput"
With Forms!StDocName
!Cwk.vis etc....

Fails

I've tried bracket and all sort to no avail.

Thanks in advance


You might want to set DataInput to a form object. Ex:

Sub FormTest()
Dim f As Form
Dim s As String
s = "DataInput"
Set f = Forms!DataInput 'assumes DataInput is open.
'or Set f = Forms(s)
'or Set f = Forms("DataInput")
With f
MsgBox .Name
End With
Set f = Nothing
End Sub
Nov 13 '05 #3

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

Similar topics

0
by: Madhusudan Singh | last post by:
Hi After months of waiting for Redhat to come out with up to date rpms, I decided to compile a working OpenSSL/ MySQL / PHP / httpd installation for myself. Installed the latest versions of...
0
by: Alexander Skwar | last post by:
Hello! I'm having problems getting PHP 4.3.3RC4 successfully to install on my HP-UX 11.00 server. After a (successfull?) compile, "make install" errors out with this error message: ...
7
by: Darren Gamble | last post by:
Good day, I've sent a message on this to the php-general list already, but unfortunately no one replied. Sorry for the repost. to those that read both... I'm having a problem working with an...
0
by: Slavik | last post by:
All libraries were installed (precompiled) This is FreeBSD 5.1 installed zlib, installed jpeg and png libraries (in default directories) GD 2.0.11 source is in /usr/gd-2.0.11 (compiled and...
0
by: LRW | last post by:
(Not even sure if that's the right way to word the question.) We're trying to migrate to a new server, and upgrade the PHP on the new server in the process. We're using a RedHat Enterprise Server...
0
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
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
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...
1
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.