HELP! Error Message 438: "Object doesn't support property or method"

When I try to open an Access 2003 MDB file on our server, I receive a Microsoft Access Error Message 438: Object doesn't support property or method. I've tried updating and installing Microsoft updates. It didn't solve the problem. I then tried reinstalling Access 2003 and all of the updates. Still get the same error message. Anyone have any idea what I can do?

Post your answer or comment

comments powered by Disqus
Hi all, I am trying to basically set the value of an option box through simple VBA, and I just can't get it to work, I receive Run-time error '438': Object doesn't support property or method. Here's the code:

	Public Sub ProjectViewCmd(ID As Long, Stat As String)
    Dim i As Integer
    Dim MyBox As String
    'if it is a project lead
    If Stat = "Active Lead" Or Stat = "Dead Lead" Then
        DoCmd.OpenForm "Project Leads", acNormal
        If Stat = "Dead Lead" Then
            Forms![Project Leads].Controls(BothOption).Value = True
            Forms![Project Leads].FilterOn = False
            Forms![Project Leads].Controls(ActiveOption).Value = False
            Forms![Project Leads].Controls(DeadOption).Value = False
        End If
        DoCmd.SearchForRecord acForm, "Project Leads", acFirst, "[Project ID]=" & ID
        'if it belongs in the project list form (i.e. not a lead)
            DoCmd.OpenForm "Project List", acNormal
            For i = 0 To 4
                MyBox = "Check" & CStr(i)
                If Forms![Project List].Controls(MyBox).Tag = Stat Then
                    Forms![Project List].Controls(MyBox).Value = True
                End If
            Next i
    End If

End Sub

The problem lines are
Forms![Project Leads].Controls(BothOption).Value = True
Forms![Project Leads].FilterOn = False
Forms![Project Leads].Controls(ActiveOption).Value = False
Forms![Project Leads].Controls(DeadOption).Value = False

Basically, depending on the status of a project (Active Lead, Dead Lead, etc) a button needs to open the correct form to view that project. However by default the forms are filtered and have buttons to adjust said filters. When I open the forms, I need to change the filters in order to have the selected project present in the recordset. My issue comes up when trying to simply set the option box back to false

I have a database with a login form. After distributing the FE (incl. Access Runtime 2007 which is installed automatically) on 5 pc's everything was working, except for one PC. After clicking on the OK button in the login form it showed the error message: "Object doesn't support property or method". The PC is using XP prof SP3.

There used to be a trail version of Access 2007 installed on this PC, after i deleted it, it still didn't work. I've reinstalled the trail and used the original db on USB stick (the BE is on server). It still showed the same error.

I've checked the liberary (reference) settings and they were the same as on my pc, so this shouldn't be the problem.

On all the other PC's the code is working, so I thought there's no need to include the coding. (this should be correct).

You have any thoughts?

Thanks in advance!

Dear Friends,

I'm getting below error while using MS Flex Grid

Run time error 438 object doesn't support this property or method.

I have registered "Microsoft FlexGrid Control 6.0 (SP3)" but still getting this error.

Below is the code I'm using:

'MS Flex Grid Control used to create the form/grid
Private Sub InitProc()
txtSearch.Value = ""
MSFG1.ColWidth(0) = 0
MSFG1.ColWidth(1) = 1500
MSFG1.ColAlignment(1) = 0
MSFG1.ColWidth(2) = 4500
MSFG1.ColAlignment(2) = 0
MSFG1.ColWidth(3) = 1500
MSFG1.TextMatrix(0, 1) = "User ID" 'Assign the value of "User ID" Field
MSFG1.TextMatrix(0, 2) = "User Name"
MSFG1.TextMatrix(0, 3) = "Status"
End Sub

OS: Windows XP
MS Access: 2003

Thanks in advance for the help.



I am facing the run time error '438': Object doesn't support this property or method. It works fine from last 15 days & at sudden by yesterday,gives me this error in all Treeview/Listview controls of M/S common controls 6.0 (SP2). Can anyone help me in this issue?

Thanks a lot in advance,

I have two combo boxes in my form, One is called as CompanyID, another ZoneID.
On event LostFoucus wiht CompanyID combo box I write VB code like this :

Private Sub Company_ID_LostFocus()

Me!ZoneID.RowSource = "SELECT [ZoneID] FROM [device]"

With Me!ZoneID
.RowSource = "SELECT ZoneID FROM deveice"
.RowSourceType = "Table/Query"
.ListRows = 5
End With

End Sub

But whenever CompanyID combo box lost focus a err message box shows up
on screen it say Run-time error '438' : Object doesn't support this property
or method.

Who can help me this ?

Thanks in advance !!!


[This message has been edited by JSL (edited 12-13-2000).]

[This message has been edited by JSL (edited 12-13-2000).]

Long story short, my DB was working fine until I exported a new form from another DB (same DB, just another file) into my current DB and replaced it. Now when I click a record to open it I receive the error "Object doesn't support this property or method"

how can i fix this??

the vba opens and this code seems to be a problem:

    Call ErrorLog(Err.Name, Err.Number, Me.Name, Erl, "Form_Load")  1 Then
            If varOpenArgsRecord(2) = "NewSimple" Then
                Me.TabControl.Style = 2
                Me.TabControl.TabFixedHeight = 0
            End If
        End If
    End If

    Exit Sub

    Call ErrorLog(Err.Name, Err.Number, Me.Name, Erl, "Form_Load")
    Resume Form_Load_Exit
End Sub


I've tryed to insert a row in an excel sheet that I filled through an Access Table. Everything is ok with it, but when I try to use the generated code after recording a row insertion in excel, I get the following message:

Object doesn't support property or method

My code is the following:

    appExcel.ActiveSheet.Selection.Insert 'Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    appExcel.ActiveSheet.Selection.Insert 'Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

Where appExcel is my Excel Object declared as:

	Dim appExcel As Object
Set appExcel = CreateObject("Excel.Application")

When debbuging the error is in the .Insert row even if I comment the shifting part and so.

Any clue about how to get the code to insert 2 rows and paste in them other row's content?

I'd appreciate whatever you can suggest. Thanks in advance.


Hello All,

I am trying to get this to work. Basically, Im trying to copy the current records with the records of the subform and paste them in a new record.

I keep getting this error message "object doesn't support this property or method" It doesn't tell me where the error is or nothing???

What am I doing wrong?

Here is a simplified copy of the code.

	Dim dbs As Database, Rst As Recordset
        Dim SRst As Recordset

        Dim scompany As String
        Dim saddress As String

'Subform fields

Dim sSequenceNumber As Long
Dim sSequenceDescription As String

On Error GoTo Err_btnDuplicate_Click

Set dbs = CurrentDb
Set Rst = Me.RecordsetClone
Set SRst = Me.RoutingSubform.Form.RecordsetClone

scompany = "" & Me!company
saddress = "" & Me!Address

'Subform Fields

sSequenceNumber = "" & Me!RoutingSubform!SequenceNumber
sSequenceDescription = "" & Me!RoutingSubform!SequenceDescription

 With Rst
              !company = scompany
              !Address = saddress

'Subform fields

With SRst
     !SequenceNumber = sSequenceNumber
     !SequenceDescription = sSequenceDescription

 .Update                     ' Save changes.
           .Move 0, .LastModified
        End With
        Me.Bookmark = Rst.Bookmark

        Exit Sub

        MsgBox Error$
        Resume Exit_btnduplicate_Click:
End With
End Sub


I've been using this bit of code for a while now and I'm sure it worked a week ago, but suddenly its not.
I'm getting Runtime error 438 Object doesn’t support this property or method.
Can anyone help?


Public Sub ExpFile_Excel()
Mth = Format(Now, "YYYYMM")
Dte = Format(Now, "YYYYMMDD")
Tme = Format(Now, "HH-MM-SS")
Set FDialog = Application.FileDialog(msoFileDialogSaveAs)
With FDialog
.AllowMultiSelect = False
.InitialFileName = FileName
.Title = "ATMT: Please select a save location"
.Filters.Add "Microsoft Excel 2003", "*.xls"
.Filters.Add "Microsoft Excel 2007", "*.xlsx"
.Filters.Add "Microsoft Excel 2007", "*.xlsm"
If .Show = True Then
For Each varFile In .SelectedItems
DestFile = .SelectedItems(1)
End If
End With
End Sub

Hello everyone, I have an old database in my group that has been handed down. It was originally created with 2003 and I'm getting an error "Object doesn't support this property method" when I select a button to search for a csv or xls file to import.

Does anyone know the solution or have any suggestions? I'm okay for a business person in vba but definitely not at the super user level.

If Me!XLSImport Then
SFileName = OpenFile.("Find Cost Detail Excel Spreadsheet", "xls")
' MsgBox "Only Excel files are importing at this time."
' Exit Sub
SFileName = BrowseFilename("Find Comma Seperated Value file", "csv")
End If



I get an object doesn't support this property or method error when I execute this code... The bold statement below is where the debugger focuses in on, all other code works. Any incite would be greatly appreciated. Thanks

Private Sub Form_Load()
DoCmd.OpenForm "frmDateOfHire", , , , , acHidden
DoCmd.OpenForm "frmSalary", , , , , acHidden
DoCmd.OpenForm "frmClient", , , , , acHidden
DoCmd.OpenForm "frmSupervisor", , , , , acHidden
DoCmd.OpenForm "frmProject", , , , , acHidden
DoCmd.OpenForm "frmPrimaryVendor", , , , , acHidden
DoCmd.OpenForm "frmContractEmployee", , , , , acHidden

End Sub

Private Sub Next_frmDateOfHire_Click()

'Calls the Date Of Hire form, and hides Employee form
Forms!frmDateOfHire.Visible = True
Me.Visible = False

End Sub

I am getting an error: "Object doesn't support the property or method"

using the following very reliable code.
It errors on CDlg1.DialogTitle = "Select File in Folder"

The only difference now is I am using a Win 7 64bit. I added Comdlg32.ocx to the WOW64 folder and registered it. It is in the References OK.

Private Sub cmdBrowse_Click()
Dim fileflags As FileOpenConstants
Dim filefilter As String
Dim sPath As String

'Set the text in the dialog title bar
CDlg1.DialogTitle = "Select File in Folder"
'Set the default file name and filter
CDlg1.DefaultExt = "xls*"
CDlg1.InitDir = ""
CDlg1.filename = ""
filefilter = "*.xls"
CDlg1.Filter = filefilter
CDlg1.FilterIndex = 0
'Prompt to create the file if it does not exist
'and prompt to overwrite if the file exists
fileflags = cdlOFNCreatePrompt + cdlOFNOverwritePrompt
CDlg1.Flags = fileflags
'Show the Save As common dialog box
'Return the path and file name selected or
'Return an empty string if the user cancels the dialog
sPath = CDlg1.filename

If sPath "" Then
txtImportPath = GetFolder(sPath)
End If
End Sub

I get this msg when i try to run the code below:

Object doesn't support this property or method

The error is caused by the following line.
I got it straight from a book so it should work. It doesn't seem to like me using Find:
Me.Recordset.Find "LastName = " & strName, Start:=1

Private Sub cmdFind_Click()

Dim strName As String
Dim varBookmark As Variant
varBookmark = Me.Recordset.Bookmark
strName = InputBox("Enter Surname")

Me.Recordset.Find "LastName = " & strName, Start:=1
If Me.Recordset.EOF Then
MsgBox "Surname " & strName & " Not Found!!"
Me.Recordset.Bookmark = varBookmark
End If
End Sub

Good day all!

Very simple conditions on open:

If Forms!frmLabsBuildFieldExamCards!tblLabsSignatory_ ID = 1 Then
Me.ImageMukhand = True
'Me.LabelMukhand = True
'Me.ImageKhaled = False
'Me.LabelKhaled = False
End If

I have some names and images of signatures that have to be either displayed or hidden depending on which signatory is selected.

However - the debug gives me "Object doesn't support this property or method"

is there anyway I can get an image to hide?

I developed a software using MS Access 2003. I have imported a new progress bar control and used it. It was working properly. After more than two years, I back to this software and tried to run it on another computer. A problem is arise now giving a message "the object doesn't support this property or method" when processing the instruction progressbar1.min=0. This is happening despite that I added the ocx file ccrppr6.ocx into the C:/windows/system32.


I'm trying to use the following code (modified from something WayneRyan kindly sent me a while back) to get the text in the date/text box to flash red when the membership expiry date is close (within 30 days):

	Private Sub Form_Current()
  If Abs(DateDiff("d", Me![MembershipExpiryDate], Date)) < 30 Then
     Me![MembershipExpiryDate].ForeColor = 255
     Me![MembershipExpiryDate].ForeColor = 0
  End If
End Sub

Private Sub Form_Timer()
If Me![MembershipExpiryDate].Visible = True Then
    Me![MembershipExpiryDate].Visible = False
    Me![MembershipExpiryDate].Visible = True
End If

End Sub

Can anyone see where i'm going wrong? It doesn't go red, or flash (like they should when the date is close) and also i get an error 438 'object doesn't support property or object' when viewing some empty fields.

Anyone have any idea? I have set the timer interval to 1000.

Many thanks


I get error 2471, The object doesn't contain Automation object every time I enter a string into ModelEntry field. If I put a string inside " ", eg. "Cookies" then I don't get the error.
But I get the ProductName record with quotes eg. "Cookies" which I don't want. Why do I have to enter the ProductName inside quotes?
Please help...

Public Sub ModelRecordHandler()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim hldID 'As Double
Dim pkName As String
Dim Inc As Integer
Dim tblName As String
Dim Criteria As String

Set db = CurrentDb()
tblName = "Products"
pkName = "ProductID"

Criteria = "[ProductName] = " & Me![ModelEntry]

'Check if ModelEntry exist in table
hldID = Nz(DLookup("[" & pkName & "]", tblName, Criteria), False)

If hldID Then 'ModelEntry exist
If Me!chkInc Then 'Set Inc via checkboxes for BarEntry exist
Inc = 1
Inc = -1
End If
Else 'ModelEntry does not exist. Add new record
Inc = 1 'Set Inc for new item

'Recordset method is used in order to hold newly assigned
'Primary Key
Set rst = db.OpenRecordset(tblName, dbOpenDynaset)
rst!ProductName = Me!ModelEntry

rst!SupplierID = Me!CurrentBrand
rst!InvoiceIDTag = Me!CurrentInvNo
rst!Discount = Forms!frmInvoices!TaxRate

hldID = rst(pkName) 'hold PrimaryKey for lookup later on
MsgBox hldID
rst!ModelNo = hldID

Set rst = Nothing

Me.Requery 'To include new record in form recordsource
End If

Set rst = Me.RecordsetClone
rst.FindFirst pkName & " = " & hldID
Me.Bookmark = rst.Bookmark 'goto record with PrimaryKey = hldID
Me!InvoiceIDTag = Me!CurrentInvNo

Set rst = Nothing

Me!UnitsInStock = Me!UnitsInStock + Inc 'Increment +/- occurs here
Me!QtyShipped = Me!QtyShipped + Inc 'increment duplicate items

DoCmd.RunCommand acCmdSaveRecord
If Me!UnitsInStock < 0 Then Beep 'Audible warning for less than zero
Me!ModelEntry = "" 'Clear the textbox
Me!chkInc.SetFocus 'Necessary in handling focus!
Me!ModelEntry.SetFocus 'Set focus back for next entry

Set db = Nothing

End Sub

Hi All,

I'm sure this issue has come up elsewhere on the forum, but I can't find a solution...any help would be most appreciated.

Overview is this - I have a form showing records of company info and a subform where the user can enter an account number associated with that company.
The main form "frmCompanyEntry" has a button "AddNewAccount" that on the button's "On Click" event -
1. makes visible the subform "subfrmAccountAdd1"
2. starts a new record in the underlying table "tblAccounts"
3. sets the CompanyID field of "tblAccounts" to match the CompanyID field of the current record on the parent form from the table "tblCompany"
4. moves the focus to the AccountNumber field (the only visible field on the subform)
There is a button next to the AccountNumber field to save the record, move the focus off the subform and set the form as not visible.

OK - so everything seems to be working, but when the main form's "AddNewAccount" button is "clicked", I get a warning saying "doesn't support this property or method". I can click it away and the subform works fine, but I can't get rid of the warning.....
here is the code in the main form:

Private Sub AddNewAccount_Click()
On Error GoTo Err_AddNewAccount_Click
    Dim stDocName As String
    Dim AddCompID As Integer
    AddCompID = Me![CompanyID]
    stDocName = "subfrmAccountAdd1"
    Forms!frmCompanyEntry!subfrmAccountAdd1.Visible = True
    DoCmd.GoToRecord , , acNewRec
    Me.subfrmAccountAdd1.[CompanyID] = AddCompID
    Exit Sub
    MsgBox Err.Description
    Resume Exit_AddNewAccount_Click
End Sub

and here is the only code in the subform (to save record, move focus and set visibility to false

Private Sub SaveNewAccount_Click()
On Error GoTo Err_SaveNewAccount_Click
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    Forms!frmCompanyEntry!subfrmAccountAdd1.Visible = False
    Exit Sub
    MsgBox Err.Description
    Resume Exit_SaveNewAccount_Click
End Sub

I am very much a beginner at access so any advice would be helpful

Thanks in advance.


i am trying to open and view Peter Hibbs' Appointments demo database where he uses the flex grid control. I have copied the necessary firl into my c:/windows/system32 folder and have had a successful registration of the file.

When i open the database and the first screen appears I get the error message " Object doesn't support this property or method"

I am using ms access 2007 on windows 7 32 bit computer. Any help be much appreciated as I would love to see what this control can do to maybe incorporate into my simulator bookings database



On my form, I designated the textboxes and comboboxes which the user has to fill in in order to save a record by making their back color yellow. In the on click event of the Save button, I want to check if any of the yellow controls are blank:

PHP Code:
Dim ctl As Control
For Each ctl In Me.Controls
If Not ctl.Name = "SaveInvoiceRecord_button" And Not ctl.Name = "Box95" Then
If ctl.BackColor = 10092543 And Len(ctl.Value Note: the first If statement excludes 2 controls that should not be checked because they don't support either the back color property or the value property. When I try to hit save, I get error 438: object doesn't support this property or method. The line
PHP Code:
If ctl.BackColor = 10092543 And Len(ctl.Value is highlighted. All of the controls are either text boxes or comboboxes. I
tried just the backcolor criteria in that line and that works. It has to be the value criteria. I also tried the following,
none of which work:
if ctl.value= ""
if ctl= "'
if ctl.value= vbnullstring
if ctl= nullstring
if len(ctl.value)=0

Can anyone tell me why my textbox and combobox controls aren't supporting this property?

Thank you.

Newbie! -- First Post!

I am using the SAME macro as the CALL TRACKER DB found in the TEMPLATES of MS Office 2007.

I copied the embedded macro on one of the forms to use on my form -which contains list of customers unique with the ID field. [Ex: A100, B100]
I have set the CustomerID to hyperlink and when the user clicks on that it opens up the selected detail of the customer in a dialog window were the user can change the values.

Macro used:

Action: open form
Argument: Customer Details
View: form
Where Condition: ="[ID]=" & Nz([ID],0)
Window Mode: Dialog

condition: Not IsNull([ID])
Action: SetTempVar
Arguments: CurrentID, [ID]

condition: IsNull([ID])
Action: SetTempVar
Arguments: CurrentID, Nz(DMax("[ID]",[Form].[RecordSource]),0)

Arguments: , , First, ="[ID]=" & [TempVars]![CurrentID]

Action: RemoveTempVar
Arguments: CurrentID

The macro works great, I get my results but when i run the macro it gives the msg:

The object doesn't contain the Automation object 'ID'.

how can i correct this?

Does it matter if I am using a text field for the CustomerID rather than the long integer in the original macro?

Also, when I click on the hyperlink, a box pops up asking me to enter in the CustomerID again.

Help, I have a chart within a report (MSGraph.Chart.8) and need to manipulate some of the properties each time it prints for a differrent customer.

Can anyone explain why the first three lines of code work, then fails on the next two:

Chart.charttitle.Font.Size = 8
Chart.Legend.Font.Size = 8
Chart.Axes(1).HasTitle = True ' a text box appears called Axis Title

Chart.Axes(1).Title.Caption = "ABC"
Chart.Axes(1).Font.Size = 20

I get an error message saying 'Object doesn't support this property' however, according the the MSDN website the above structure should work. Please don't tell me my faith in MSDN has been misplaced...


I have downloaded the sample Customer Phone List. I am running AK2007 I get a error Message " The object doesn't contain the Automation object "RecordsetClone". I check my Macro setting, appears to be OK. Anything else can I look at.


I have not been able to figure out what I need to get to the individual entries in a collection. I have the For Each loop, but the code stops at Debug.Print Item.FieldName. The following is the code. I'm looking for how to do this so it will work. Thanks! The error message is: "Object doesn't support this property or method" Run=time error '438' Code: Sub ShowFields() Dim Item As Variant For Each Item In cAddPermits Debug.Print Item.FieldName Next Item End Sub Here is the code for the two classes used here. (cFieldName) Code: Option Compare Database Option Explicit Dim mFieldName As String Public Property Get FieldName() As String FieldName = mFieldName End Property Public Property Let FieldName(newFieldName As String) mFieldName = newFieldName End Property And then cFieldNames Code: Option Compare Database Option Explicit Private mPrivateCollection As Collection ' Add a new cFieldName item to the collection Public Function Add(FieldName As String) As cFieldName Dim newItem As New cFieldName Dim Key As Variant newItem.FieldName = FieldName Key = FieldName 'add to the private collection mPrivateCollection.Add newItem, Key ', FieldName Set Add = newItem ExitFunction: Set newItem = Nothing Exit Function End Function And finally, the routine that fills the collection Code: Option Compare Database Option Explicit Public cAddPermits As cFieldNames Sub FillAddPermits() Set cAddPermits = New cFieldNames cAddPermits.ClassInitialize cAddPermits.Add "PermitType" cAddPermits.Add "FiscalYearID" End Sub

Not finding an answer? Try a Google search.