Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 4th, 2006, 03:27 PM
Registered User
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default using control.caption in Access2000

I am converitng a database with quite a bit of associated code from A97 to A2000. The following fails:

Dim ctlSample As Control

Set ctlSample = CreateControl(frm.Name, acLabel, acDetail, "", _
, sngLeft, sngTop, conWidthLabel, conHeight)

'set properties of the sample label

With ctlSample
.Caption = rst!SampAbrv


Is there a new syntax for ctl.caption in 2000? I've tried help and a web search but no joy.

Thanks,

Tiffany
Edit/Delete Message

 
Old January 5th, 2006, 10:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

First question: Have these been set yet?

frm, sngLeft, sngTop, conWidthLabel, and conHeight

For example, frm has to be set to a specific form for frm.name to work. Do you mean "this form I'm on at the moment"? If so, you can use Me.Name.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old January 5th, 2006, 03:01 PM
Registered User
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Greg -
  I checked and the variables have been initialized.

If it helps, I've put the full database, and a test dataset, at http://oregonstate.edu/~vancet/Access2000/
Database is db1, data file is 7mf05_day.

To use it

open db1
Cruise Setup > Recover Database
load 7mf05_day

then run either
Cruise Setup > New Sample
or
Enter Data and click the "Add 'new' Sample" button

What I am trying to do it to add a new sample type and have it show up in frmNewSamples, which is seen in frmEntry.

The program runs frmEnterNewSample which updates frmNew Samples. When I run in debug more the error mentioned above shows up in modUpdatefrmSamplesCollected.

When I enter a new sample is *does* end up in subfmSampleDict so part of the process is working.

Sorry to give such a verbose answer - any thoughts gratefully received.

- Tiffany

NOAA/Alaska Fisheries Science Center
Oregon State University/Dept. of Geography






Similar Threads
Thread Thread Starter Forum Replies Last Post
Control button caption and visible property chacquard Access VBA 7 September 9th, 2005 11:14 AM
Why can't insert number value in Access2000? Edward King Java Databases 3 June 21st, 2005 03:00 AM
access2000-compact on close Tasha Access VBA 3 September 29th, 2004 08:31 PM
caption jlnashrod Access VBA 2 April 5th, 2004 10:48 PM
access2000 and vb6.0 cydel VB How-To 1 September 5th, 2003 04:20 AM





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