Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object doesn't support this property or method 1

Status
Not open for further replies.

EnergyTed

Programmer
Jan 27, 2005
68
GB
This worked previously with no problems.

Here is my code -

Private Sub Building_Type_Change()

If [Building Type] = "Flat" Then
[Extension].Enabled = False
[Extension age].Enabled = False
[Property 3rd floor area].Enabled = False
[Extension basement floor area].Enabled = False - "This line now shows the error"
[Extension ground floor area].Enabled = False
[Extension 1st floor area].Enabled = False
[Extension 2nd floor area].Enabled = False
[Extension 3rd floor area].Enabled = False
[Basement exposed floor area].Enabled = True
[Lowest floor exposed floor area].Enabled = True
[Next floor 1 exposed floor area].Enabled = True
[Next floor 2 exposed floor area].Enabled = True
[Exposed roof area].Enabled = True
[Storey Number].Enabled = True
[Third floor storey height].Enabled = False
[Internal heat loss floor perimeter].Enabled = True
[Exposed Extension perimeter].Enabled = False
[Exposed conservatory perimeter].Enabled = False
[Extension wall constr].Enabled = False
[Extension Stone wall type].Enabled = False
[Extension Stone wall material].Enabled = False
[Extension Stone wall thickness].Enabled = False
[Extension roof constr].Enabled = False
[Extension roof U value].Enabled = False
[Extension roof ins].Enabled = False
[Conserv ground floor area].Enabled = False
[Conserv 1st floor area].Enabled = False
[Conservatory D/G].Enabled = False
[Conservatory].Enabled = False
[Extension wall U value].Enabled = False
[Measurements] = "Internal"
[Measurements].Enabled = False
[Third floor storey height].Enabled = False

Can someone please advise, as I said this has been sent out in previous version with no problems.

Run-time error '438':
Object doesn't support this property or method.
 
Which line of code gives you the error?

Ed Metcalfe.

Please do not feed the trolls.....
 
[Extension basement floor area].Enabled = False - "This line now shows the error"
 
Are you sure this control still exists on the form? And that it hasn't been renamed?

Try prefixing it with "Me." - does it appear in the list of form controls?

It may be worth trying deleting and recreating the control.

Ed Metcalfe.

Please do not feed the trolls.....
 
Yes it still exists, when I take the line out, the error moves to the next line.

When you say delete and recreate the control, do you mean delete the field and code behind it and redo?

I will try the "Me" fix first.

Thanks
 
Hi...

What are we dealing with?

A previous version of what?

Custom Classes?

Controls on a form?

Different versions of Access?

a little more information would be helpful.
 
I am dealing with an event procedure on a field in a form, On Exit and On Change.

A previous version of the same database.

Same version of Access.

Thanks
 
Open up a module and run the following from your immediate window:

Code:
saveastext acForm ,"formname","filename"

This will save the design of your form in a text file in the filepath you specified. Locate and open the text file, post the contents here so we can recreate your form and try to diagnose the problem for you.

Ed Metcalfe.

Please do not feed the trolls.....
 
Hi...

Did you copy a working form and make changes, this can cause unexpected errors sometimes.

Look carefully at the names and types of your Controls and make sure you are not trying to ENABLE a label.
 
Sorry Ed2020 Here is the missing part.

Version =20
VersionRequired =20
Checksum =-1495903699
Begin Form
RecordSelectors = NotDefault
AutoCenter = NotDefault
NavigationButtons = NotDefault
DividingLines = NotDefault
DefaultView =0
PictureAlignment =2
DatasheetGridlinesBehavior =3
GridY =10
Width =14550
DatasheetFontHeight =10
ItemSuffix =740
Left =345
Top =990
Right =15405
Bottom =10470
DatasheetGridlinesColor =12632256
RecSrcDt = Begin
0x29d5f05054b1e240
End
RecordSource ="tabNHERQuestions"
Caption =" "
OnOpen ="[Event Procedure]"
DatasheetFontName ="Arial"
PrtMip = Begin
0x8905000089050000890500008905000000000000201c0000e010000001000000 ,
0x010000006801000000000000a10700000100000001000000
End
PrtDevMode = Begin
0x5c5c48504257434e3031464e505c504f4f4c3900000000000000000000000000 ,
0x010418009c00b803033f80070100090000000000640001000700580202000100 ,
0x5802000000004c65747465720000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000001000000 ,
0x0200000000000000000000000000000000000000000000000000000094042e00 ,
0x485020436f6c6f72204c617365724a657420383535302050434c203543000000 ,
0x00000000000004003200be018603789c65904b6b53511485f73ae7b4c7c6b456 ,
0xd0b68a8fa3564d1d5c926040142a981a2d745010a413ab42a2bd5ad62eb98928 ,
0xe223431d3856f487888f0ace05ff8023ff8013f16d3db76814dc83b5d7f9ce64 ,
0xed9565ff8f812ce184896b19ef84fbc13559396a386bb461ec2933e9ec69f31a ,
0x2ca15b060f40a7a0fbc049702700b9896db2721bbc057f273e850b4eef81f721 ,
0xdc809e811fc869cfc30fe6c6410e62a4b4a5ba6b3adaca5ffb56faf6bd8c96c6 ,
0xaa615a0f818be079e805a3e78cbf8e090933ad4b17bbcb9d30df4ed909675a9d ,
0x4ecacb99f006b40a1e337ed115a49132cd96e287e89cd3e78e4d27f14085937c ,
0x5f41031c827e12fe107e157e17ee06373a169c0e39ef6308f1c55cf5b3e837e1 ,
0x4fd1ade018380e3eb4bd47d6bfb1f9b1013a013b8ca670043a0add04fb0c6b6b ,
0xf638ee16d51bee857f9adfedb7afeb8e75fd20510721d6c8ef7990fc7111bb3e ,
0x7efc2f1ee8e3277dac75e35fd8b21ca9d5cab18c76daca4269be3e176af5a9b3 ,
0xad76962a43389c54934a528ed55d4b424e138931bec866b1752c183b13454f22 ,
0x87b318162dc42ac062cce7302ebaeaf851b86af8cab069fccb18af22dd3dc89b ,
0xbc0a1f5b8dd7fc02725b71cc0000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000000000000000000000000000 ,
0x0000000000000000000000000000000000000000
End
PrtDevNames = Begin
0x080026003a000100485020436f6c6f72204c617365724a657420383535302050 ,
0x434c203543005c5c48504257434e3031464e505c504f4f4c390049505f313530 ,
0x2e332e33362e323700
End
Begin
Begin Label
BackStyle =0
End
Begin Rectangle
SpecialEffect =3
BackStyle =0
Width =4686
Height =1120
End
Begin Line
Width =1701
End
Begin Image
BackStyle =0
OldBorderStyle =0
PictureAlignment =2
Width =1701
Height =1701
End
Begin CommandButton
Width =1701
Height =283
FontSize =8
FontWeight =400
ForeColor =-2147483630
FontName ="MS Sans Serif"
End
Begin OptionButton
SpecialEffect =2
LabelX =230
LabelY =-30
End
Begin OptionGroup
SpecialEffect =3
Width =1701
Height =1701
End
Begin BoundObjectFrame
SpecialEffect =2
Width =4536
Height =2835
LabelX =-1701
End
Begin TextBox
SpecialEffect =2
OldBorderStyle =0
Width =1701
LabelX =-1701
End
Begin ComboBox
SpecialEffect =2
Width =1701
LabelX =-1701
End
Begin UnboundObjectFrame
SpecialEffect =2
OldBorderStyle =1
Width =4536
Height =2835
End
Begin CustomControl
SpecialEffect =2
Width =4536
Height =2835
End
Begin ToggleButton
Width =283
Height =283
FontSize =8
FontWeight =400
ForeColor =-2147483630
FontName ="MS Sans Serif"
End
Begin Tab
Width =5103
Height =3402
End
Begin Page
Width =1701
Height =1701
End
Begin Section
Height =5835
BackColor =12632256
Name ="Detail"
Begin
Begin Tab
OverlapFlags =85
BackStyle =0
Left =90
Top =120
Width =14460
Height =5715
FontSize =10
Name ="TabCtl0"
Begin
Begin Page
OverlapFlags =215
Left =225
Top =566
Width =14190
Height =5134
Name ="Client Details"
EventProcPrefix ="Client_Details"
Begin
Begin ComboBox
LimitToList = NotDefault
OverlapFlags =223
TextAlign =3
ColumnCount =2
ListWidth =1200
Left =2832
Top =627
Width =3405
Height =256
FontSize =10
ColumnInfo ="\"\";\"\";\"\";\"\";\"10\";\"50\""
Name ="TitlesID"
ControlSource ="Title"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabtitles].[TitlesID], [tabtitles].[List of Titles] FROM [ta"
"btitles];"
ColumnWidths ="0;1200"
BaseInfo ="\"SELECT DISTINCTROW [tabtitles].[TitlesID], [tabtitles].[List of Titles] FROM ["
"tabtitles];\";\"tabtitles\";\"\";\"TitlesID\";\"List of Titles\";\"PrimaryKey\""
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =848
Top =623
Width =1410
Height =256
FontSize =10
Name ="Label224"
Caption ="Title:"
End
End
End
Begin TextBox
OverlapFlags =223
TextAlign =3
Left =2832
Top =963
Width =3405
Height =256
FontSize =10
TabIndex =1
Name ="Forename"
ControlSource ="Forename"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =848
Top =963
Width =1410
Height =256
FontSize =10
Name ="Label225"
Caption ="Forename:"
End
End
End
Begin TextBox
OverlapFlags =223
TextAlign =3
Left =2832
Top =1303
Width =3405
Height =256
FontSize =10
TabIndex =2
Name ="Surname"
ControlSource ="Surname"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =848
Top =1303
Width =1410
Height =256
FontSize =10
Name ="Label226"
Caption ="Surname:"
End
End
End
Begin TextBox
OverlapFlags =223
TextAlign =3
Left =2832
Top =1651
Width =3405
Height =256
FontSize =10
TabIndex =3
Name ="DOB"
ControlSource ="DOB"
Format ="Short Date"
InputMask ="##/##/####"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =848
Top =1644
Width =1410
Height =256
FontSize =10
Name ="Label581"
Caption ="Date Of Birth:"
End
End
End
Begin TextBox
Enabled = NotDefault
Locked = NotDefault
OverlapFlags =223
TextAlign =3
Left =2832
Top =1984
Width =3405
Height =256
FontSize =10
TabIndex =4
Name ="Age"
ControlSource ="=DateDiff(\"yyyy\",[DOB],Now())+Int(Format(Now(),\"mmdd\")<Format([DOB],\"mmdd\""
"))"
DefaultValue ="0"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =857
Top =1984
Width =1410
Height =256
FontSize =10
Name ="Label594"
Caption ="Age:"
End
End
End
Begin TextBox
OverlapFlags =223
TextAlign =3
Left =2832
Top =2324
Width =3405
Height =256
FontSize =10
TabIndex =5
Name ="Tel No"
ControlSource ="Tel No"
EventProcPrefix ="Tel_No"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =848
Top =2324
Width =1410
Height =256
FontSize =10
Name ="Label227"
Caption ="Tel No:"
End
End
End
Begin ComboBox
LimitToList = NotDefault
OverlapFlags =223
TextAlign =3
ColumnCount =2
ListWidth =3755
Left =2833
Top =2664
Width =3411
Height =256
FontSize =10
TabIndex =6
ColumnInfo ="\"\";\"\";\"\";\"\";\"10\";\"100\""
Name ="Recipient Type"
ControlSource ="Recipient Type"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabRecipientChoices].[RecipientID], [tabRecipientChoices].[R"
"ecipientPickList] FROM [tabRecipientChoices];"
ColumnWidths ="0;2055"
EventProcPrefix ="Recipient_Type"
BaseInfo ="\"SELECT DISTINCTROW [tabRecipientChoices].[RecipientID], [tabRecipientChoices]."
"[RecipientPickList] FROM [tabRecipientChoices];\";\"tabRecipientChoices\";\"\";\""
"RecipientID\";\"RecipientPickList\";\"PrimaryKey\""
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =859
Top =2664
Width =1410
Height =256
FontSize =10
Name ="Label580"
Caption ="Client/Tenure:"
End
End
End
Begin ComboBox
OverlapFlags =223
IMESentenceMode =3
ListWidth =630
Left =2828
Top =3459
Width =3408
Height =256
FontSize =10
TabIndex =7
ColumnInfo ="\"\";\"\";\"10\";\"100\""
GUID = Begin
0x1ae3d58d40d2f745be621996f015dad0
End
Name ="Building Type"
ControlSource ="Building Type"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabBuilding Type].[Value] FROM [tabBuilding Type];"
ColumnWidths ="630"
OnExit ="[Event Procedure]"
OnChange ="[Event Procedure]"
EventProcPrefix ="Building_Type"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =577
Top =3458
Width =1695
Height =285
FontSize =10
Name ="Label644"
Caption ="Building Type:"
GUID = Begin
0x4eed0040e642fa4480e77e10c5c5eb21
End
End
End
End
Begin ComboBox
OverlapFlags =223
IMESentenceMode =3
ListWidth =2247
Left =2828
Top =3798
Width =3408
Height =256
FontSize =10
TabIndex =8
ColumnInfo ="\"\";\"\";\"10\";\"100\""
GUID = Begin
0xee0ea515a23e1041aa90acbb903ec215
End
Name ="Built Form"
ControlSource ="Built Form"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabBuilt Form].[Value] FROM [tabBuilt Form];"
ColumnWidths ="1680"
EventProcPrefix ="Built_Form"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =574
Top =3798
Width =1695
Height =240
FontSize =10
Name ="Label645"
Caption ="Built Form:"
GUID = Begin
0xdea1061d748fd741be260a0433bd4b65
End
End
End
End
Begin ComboBox
OverlapFlags =223
IMESentenceMode =3
ListWidth =795
Left =2828
Top =4138
Width =3408
Height =256
FontSize =10
TabIndex =9
ColumnInfo ="\"\";\"\";\"10\";\"100\""
GUID = Begin
0xd7a8617f79e6d646b7978f4b7e01b43a
End
Name ="Main property age"
ControlSource ="Main property age"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabMain Property Age].[Value] FROM [tabMain Property Age];"
ColumnWidths ="795"
EventProcPrefix ="Main_property_age"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =566
Top =4140
Width =1695
Height =255
FontSize =10
Name ="Label647"
Caption ="Property Built:"
GUID = Begin
0x111fa2761c5b774c80127d736170319c
End
End
End
End
Begin ComboBox
RowSourceTypeInt =1
OverlapFlags =223
TextAlign =3
IMESentenceMode =3
ListWidth =1440
Left =2832
Top =4478
Width =3411
Height =256
FontSize =10
TabIndex =10
GUID = Begin
0xfb577d3189a7924b86a1befd3bbcc40d
End
Name ="Traditional"
ControlSource ="Traditional"
RowSourceType ="Value List"
RowSource ="\"Yes\";\"No\""
ColumnWidths ="1440"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =575
Top =4478
Width =1695
Height =240
FontSize =10
Name ="Label689"
Caption ="Traditional:"
GUID = Begin
0xc2b07cf7c8c7a44ea0cbfbdfaeb57205
End
End
End
End
Begin ComboBox
OverlapFlags =223
IMESentenceMode =3
ListWidth =2247
Left =9639
Top =3458
Width =3963
Height =256
FontSize =10
TabIndex =11
ColumnInfo ="\"\";\"\";\"10\";\"100\""
GUID = Begin
0x675142870e571d4ca5273c6f3ebc7e27
End
Name ="Extension"
ControlSource ="Extension"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabExtension].[Value] FROM [tabExtension];"
ColumnWidths ="1680"
OnExit ="[Event Procedure]"
OnChange ="[Event Procedure]"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =7933
Top =3458
Width =1140
Height =240
FontSize =10
Name ="Label646"
Caption ="Extension:"
GUID = Begin
0x2b1777ffc3c1034f89c53b16414a53e2
End
End
End
End
Begin ComboBox
Enabled = NotDefault
OverlapFlags =223
IMESentenceMode =3
ListWidth =795
Left =9639
Top =3798
Width =3963
Height =256
FontSize =10
TabIndex =12
ColumnInfo ="\"\";\"\";\"10\";\"100\""
GUID = Begin
0x260f08759542c9429d080a4f375509cf
End
Name ="Extension age"
ControlSource ="Extension age"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabExtension age].[Value] FROM [tabExtension age];"
ColumnWidths ="795"
EventProcPrefix ="Extension_age"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =7361
Top =3795
Width =1710
Height =255
FontSize =10
Name ="Label648"
Caption ="Extension Built:"
GUID = Begin
0xe67aae57908a1b4992f15e89136c175f
End
End
End
End
Begin ComboBox
LimitToList = NotDefault
OverlapFlags =223
IMESentenceMode =3
ColumnCount =2
ListWidth =450
Left =9639
Top =4138
Width =3966
Height =256
FontSize =10
TabIndex =13
ColumnInfo ="\"\";\"\";\"\";\"\";\"10\";\"100\""
GUID = Begin
0xcc769f16188a8245af32e10cc9b8f6fa
End
Name ="Conservatory"
ControlSource ="Conservatory"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabConservatory].[ID], [tabConservatory].[Ref] FROM [tabCons"
"ervatory];"
ColumnWidths ="0;450"
OnExit ="[Event Procedure]"
OnChange ="[Event Procedure]"
BaseInfo ="\"SELECT DISTINCTROW [tabConservatory].[ID], [tabConservatory].[Ref] FROM [tabCo"
"nservatory];\";\"tabConservatory\";\"\";\"ID\";\"Ref\";\"PrimaryKey\""
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =7653
Top =4138
Width =1425
Height =285
FontSize =10
Name ="Label664"
Caption ="Conservatory:"
GUID = Begin
0x2859f3513b2da344999841439172eb1a
End
End
End
End
Begin TextBox
Locked = NotDefault
OverlapFlags =223
TextAlign =3
Left =9639
Top =623
Width =3968
Height =256
FontSize =10
TabIndex =14
BackColor =12632256
Name ="Building Number"
ControlSource ="Building Number"
EventProcPrefix ="Building_Number"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =7370
Top =623
Width =1710
Height =256
FontSize =10
Name ="Label128"
Caption ="House No:"
End
End
End
Begin TextBox
Locked = NotDefault
OverlapFlags =223
TextAlign =3
Left =9639
Top =1304
Width =3968
Height =256
FontSize =10
TabIndex =15
BackColor =12632256
Name ="Building Name"
ControlSource ="Building Name"
EventProcPrefix ="Building_Name"
Begin
Begin Label
OverlapFlags =223
TextAlign =3
Left =7370
Top =1303
Width =1710
Height =256
FontSize =10
Name ="Label130"
Caption ="Building Name:"
End
End
End
Begin Rectangle
OverlapFlags =247
Left =281
Top =566
Width =6522
Height =2775
Name ="Box623"
End
Begin Rectangle
OverlapFlags =255
Left =7088
Top =566
Width =7086
Height =2778
Name ="Box624"
End
Begin TextBox
Locked = NotDefault
OverlapFlags =247
TextAlign =3
Left =9639
Top =964
Width =3968
Height =256
FontSize =10
TabIndex =16
BackColor =12632256
Name ="Sub-building Name"
ControlSource ="Sub-building Name"
EventProcPrefix ="Sub_building_Name"
Begin
Begin Label
OverlapFlags =247
TextAlign =3
Left =7256
Top =963
Width =1815
Height =256
FontSize =10
Name ="Label129"
Caption ="Sub-building Name:"
End
End
End
Begin TextBox
Locked = NotDefault
OverlapFlags =247
TextAlign =3
Left =9639
Top =1645
Width =3968
Height =256
FontSize =10
TabIndex =17
BackColor =12632256
Name ="Thoroughfare Name"
ControlSource ="Thoroughfare Name"
EventProcPrefix ="Thoroughfare_Name"
Begin
Begin Label
OverlapFlags =247
TextAlign =3
Left =7823
Top =1644
Width =1245
Height =256
FontSize =10
Name ="Label131"
Caption ="Street Name:"
End
End
End
Begin TextBox
Locked = NotDefault
OverlapFlags =247
TextAlign =3
Left =9639
Top =1985
Width =3968
Height =256
FontSize =10
TabIndex =18
BackColor =12632256
Name ="Post Town Name"
ControlSource ="Post Town Name"
EventProcPrefix ="Post_Town_Name"
Begin
Begin Label
OverlapFlags =247
TextAlign =3
Left =7426
Top =1984
Width =1650
Height =256
FontSize =10
Name ="Label132"
Caption ="Town:"
End
End
End
Begin TextBox
Locked = NotDefault
OverlapFlags =247
TextAlign =3
Left =9639
Top =2326
Width =3968
Height =256
FontSize =10
TabIndex =19
BackColor =12632256
Name ="Postcode"
ControlSource ="Postcode"
Begin
Begin Label
OverlapFlags =247
TextAlign =3
Left =7370
Top =2324
Width =1710
Height =256
FontSize =10
Name ="Label133"
Caption ="Postcode:"
End
End
End
Begin TextBox
Enabled = NotDefault
Locked = NotDefault
OverlapFlags =247
TextAlign =3
Left =9638
Top =2664
Width =3960
Height =256
FontSize =10
TabIndex =20
BackColor =12632256
Name ="Surveyor Name"
ControlSource ="Surveyor Name"
DefaultValue ="\"Gary Hamilton\""
EventProcPrefix ="Surveyor_Name"
Begin
Begin Label
OverlapFlags =247
TextAlign =3
Left =7086
Top =2664
Width =1995
Height =256
FontSize =10
Name ="Label584"
Caption ="Surveyor Name:"
End
End
End
Begin Rectangle
OverlapFlags =247
Left =281
Top =3403
Width =13895
Height =1409
Name ="Box649"
GUID = Begin
0xf92f090636fb6f4f886e6747bafe9716
End
End
Begin TextBox
Enabled = NotDefault
Locked = NotDefault
OverlapFlags =247
TextAlign =3
Left =9638
Top =3004
Width =3960
Height =256
FontSize =10
TabIndex =21
BackColor =12632256
Name ="Surveyor Reference"
ControlSource ="Surveyor Reference"
StatusBarText ="Either a name or reference number plus initials. Allow up to 15 characters."
DefaultValue ="1305"
EventProcPrefix ="Surveyor_Reference"
Begin
Begin Label
OverlapFlags =247
TextAlign =3
Left =7086
Top =3004
Width =1995
Height =256
FontSize =10
Name ="Label265"
Caption ="Surveyor Reference:"
End
End
End
Begin CommandButton
OverlapFlags =215
Left =12472
Top =5102
Width =561
Height =571
FontSize =10
TabIndex =22
Name ="cmdToBuiltForm"
Caption ="Next Page"
OnClick ="[Event Procedure]"
PictureData = Begin
0x28000000110000000f0000000100040000000000b40000000000000000000000 ,
0x1000000000000000000000000000800000800000008080008000000080008000 ,
0x8080000080808000c0c0c0000000ff0000ff000000ffff00ff000000ff00ff00 ,
0xffff0000ffffff00888888888888888888888888888888888888888880000000 ,
0x8888800888888888800000008888800088888888840000008888800008888888 ,
0x8004322688888000008888888040e26288888000000888888440366688888000 ,
0x000088888111a3338888800000088888899deaee8888800000888888888caaaa ,
0x8888800008888888811133228888800088888888811909108888800888888888 ,
0x8ff865f088888888888888888f8765f088888888888888888f0865f000000000
End
ObjectPalette = Begin
0x0003100000000000800000000080000080800000000080008000800000808000 ,
0x80808000c0c0c000ff00000000ff0000ffff00000000ff00ff00ff0000ffff00 ,
0xffffff0000000000
End
End
End
End
Begin Page
OverlapFlags =247
Left =225
Top =567
Width =14190
Height =5133
Name ="Dimensions"
Begin
Begin ComboBox
OverlapFlags =255
TextAlign =3
ListWidth =720
Left =4759
Top =624
Width =1418
Height =256
FontSize =10
ColumnInfo ="\"\";\"\";\"10\";\"100\""
Name ="Measurements"
ControlSource ="Measurements"
RowSourceType ="Table/Query"
RowSource ="SELECT DISTINCTROW [tabMeasurements].[Value] FROM [tabMeasurements];"
ColumnWidths ="720"
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =2490
Top =624
Width =1695
Height =256
FontSize =10
Name ="Label441"
Caption ="Measurements:"
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
TextAlign =3
Left =3031
Top =915
Width =1418
Height =256
FontSize =10
TabIndex =1
Name ="Property basement floor area"
ControlSource ="Property basement floor area"
Format ="Fixed"
EventProcPrefix ="Property_basement_floor_area"
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =479
Top =915
Width =2265
Height =256
FontSize =10
Name ="Label442"
Caption ="Basement Floor Area:"
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
IMESentenceMode =3
Left =7284
Top =915
Height =256
TabIndex =22
Name ="Basement storey height"
ControlSource ="Basement storey height"
Format ="Fixed"
StatusBarText ="House and flats."
EventProcPrefix ="Basement_storey_height"
GUID = Begin
0xa1240455211b564cbac875a8ae330e32
End
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =4675
Top =915
Width =2340
Height =255
FontSize =10
Name ="Label651"
Caption ="Basement Floor Height:"
GUID = Begin
0x6592b29d4d991a4db2d6b19dfcac0ec7
End
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
TextAlign =3
Left =3031
Top =1259
Width =1418
Height =256
FontSize =10
TabIndex =2
Name ="Property ground/lowest floor area"
ControlSource ="Property ground/lowest floor area"
Format ="Fixed"
EventProcPrefix ="Property_ground_lowest_floor_area"
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =479
Top =1255
Width =2265
Height =255
FontSize =10
Name ="Label443"
Caption ="Grd/lowest Floor Area:"
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
IMESentenceMode =3
Left =7284
Top =1255
Height =256
TabIndex =23
Name ="Ground or lowest storey height"
ControlSource ="Ground or lowest storey height"
Format ="Fixed"
StatusBarText ="Ground floor for houses. Lowest floor for flats."
EventProcPrefix ="Ground_or_lowest_storey_height"
GUID = Begin
0x59c0d16aa866764bb9f9b342f467dd72
End
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =4618
Top =1257
Width =2385
Height =255
FontSize =10
Name ="Label652"
Caption ="Grd/lowest Floor Height:"
GUID = Begin
0x7a71ba12d4ef0e43b0e3c229f55baeaf
End
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
TextAlign =3
Left =3031
Top =1596
Width =1418
Height =256
FontSize =10
TabIndex =3
Name ="Property 1st floor area"
ControlSource ="Property 1st floor area"
Format ="Fixed"
EventProcPrefix ="Property_1st_floor_area"
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =762
Top =1596
Width =1980
Height =256
FontSize =10
Name ="Label444"
Caption ="1st Floor Area:"
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
IMESentenceMode =3
Left =7284
Top =1596
Height =256
TabIndex =24
Name ="First floor or next floor 1 storey height"
ControlSource ="First floor or next floor 1 storey height"
Format ="Fixed"
StatusBarText ="First floor for houses. Next floor 1 for flats."
EventProcPrefix ="First_floor_or_next_floor_1_storey_height"
GUID = Begin
0xeae61771459cce46be1e7bab06eba1f5
End
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =5015
Top =1602
Width =1995
Height =255
FontSize =10
Name ="Label653"
Caption ="1st Floor Height:"
GUID = Begin
0x344b402d0c322749b770c96b0226966a
End
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
TextAlign =3
Left =3031
Top =1936
Width =1418
Height =256
FontSize =10
TabIndex =4
Name ="Property 2nd floor area"
ControlSource ="Property 2nd floor area"
Format ="Fixed"
OnExit ="[Event Procedure]"
EventProcPrefix ="Property_2nd_floor_area"
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =762
Top =1936
Width =1980
Height =256
FontSize =10
Name ="Label445"
Caption ="2nd Floor Area:"
End
End
End
Begin TextBox
DecimalPlaces =2
OverlapFlags =255
IMESentenceMode =3
Left =7284
Top =1940
Height =256
TabIndex =25
Name ="Second floor or next floor 2 storey height"
ControlSource ="Second floor or next floor 2 storey height"
Format ="Fixed"
StatusBarText ="Second floor for houses. Next floor 2 for flats."
EventProcPrefix ="Second_floor_or_next_floor_2_storey_height"
GUID = Begin
0x898038d44c4a11449e51804a45220670
End
Begin
Begin Label
OverlapFlags =255
TextAlign =3
Left =5015
Top =1936
Width =1995
Height =255
FontSize =10
Name ="Label654"
Caption ="2nd Floor Height:"
GUID = Begin
0xda4c863e7834194b823a55f0f9c3732d
End
End
End
End
 
Hi...

Which one is correct?

<First posting>
If [Building Type] = "Flat" Then
[Extension].Enabled = False
[Extension age].Enabled = False
[Property 3rd floor area].Enabled = False

[Extension basement floor area].Enabled = False - "This line now shows the error"

[Extension ground floor area].Enabled = False


<Second posting>
If [Building Type] = "Flat" Then
[Extension].Enabled = False
[Extension age].Enabled = False
[Property 3rd floor area].Enabled = False

[Extensions]![Extension basement floor area].Enabled = False

[Extension ground floor area].Enabled = False
 
Ted,

There's still something wrong with the text-representation of the form you have posted. Not sure whether something getting screwy when it's being displayed in this forum.

Unless you know of a public FTP site the file could be sent to so I can grab it from there the only two things I can think of are:

1. The control you are disabling is not of a type that supports the .Enabled property.
2. There is some kind of corruption in the control/form.

Ed Metcalfe.

Please do not feed the trolls.....
 
Another thought:

Are you sure Extension, Extension age, Property 3rd floor area, etc are the names of the *controls* and not the names of the fields in the underlying table/query? I can't see any controls with these names being created anywhere...

Ed Metcalfe.

Please do not feed the trolls.....
 
Yes, these are the fields. I am not sure what you mean by "control".

Sorry if I have misled somewhere.

 
A field is in a query/table.
A control is in a form.
A control may be bound to a field.
 
Ted,

In design view select one of your textboxes. Open the Properties window. On the "Data" tab there will be a Control Source property - what appears in this? On the "Other" tab will be a Name property - what appears in this?

Ed Metcalfe.

Please do not feed the trolls.....
 
I selected the textbox "building type". The control source is "building type" and the name property is "building type".

 
Might be worth changing the name property of each control to something different to the Control Source property. Get rid of the spaces in the names while you're at it.

You will then need to amend your code to reflect the new control names.

If that doesn't work I'm out of ideas without looking at the database.

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks for your time and effort Ed, I will post back when I implement your changes.


Ted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top