|
Subject:
|
using control.caption in Access2000
|
|
Posted By:
|
vance696
|
Post Date:
|
1/4/2006 2:27:51 PM
|
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 By:
|
SerranoG
|
Reply Date:
|
1/5/2006 9:50:21 AM
|
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 By:
|
vance696
|
Reply Date:
|
1/5/2006 2:01:22 PM
|
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
|