Simple VBA Issue

  • Thread starter Thread starter jahi
  • Start date Start date
J

jahi

Hi

I am new to VBA and am attempting to update a table value based on a
value looked up in a combo box.

My VBA is as follows:

[Tables]![tblSpecialPrices]![Description] = [Forms]![frmSpecialPrice3]!
[fsubSpecialPrices3].Combo16.Column(1)

I keep getting error 438, with text 'Object doesn't support this
property or method'

I can't see where I have gone wrong, I assume it is because the second
column in my combo box that I refer to in my VB statement is not
stored anywhere after selecting the value?

If so, how do I store this value for later use?

Any help would be much appreciated.
 
Hi

I am new to VBA and am attempting to update a table value based on a
value looked up in a combo box.

My VBA is as follows:

[Tables]![tblSpecialPrices]![Description] = [Forms]![frmSpecialPrice3]!
[fsubSpecialPrices3].Combo16.Column(1)

I keep getting error 438, with text 'Object doesn't support this
property or method'

I can't see where I have gone wrong, I assume it is because the second
column in my combo box that I refer to in my VB statement is not
stored anywhere after selecting the value?

If so, how do I store this value for later use?

Any help would be much appreciated.

The problem is the [Tables]! syntax. You simply cannot reference a table in
this manner - there is no Tables collection in this context.

What is the context? Is the Form based on tblSpecialPrices or on some other
table? Are you trying to update an existing record in tblSpecialPrices - if
so, which record?

John W. Vinson [MVP]
 
Back
Top