Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 4th, 2006, 03:27 PM
Registered User
 
Join Date: Oct 2005
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old January 5th, 2006, 10:50 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
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
Reply With Quote
  #3 (permalink)  
Old January 5th, 2006, 03:01 PM
Registered User
 
Join Date: Oct 2005
Location: , , .
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:58 PM.


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