Re: 'Method 'Value' of object '_AccessField' failed

From: Val Mazur (group51a_at_hotmail.com)
Date: 02/27/04


Date: Thu, 26 Feb 2004 22:56:23 -0500

Hi,

Try to use Fields collection

frm!UnitWeight = Nz(tbl.Fields("NewWgt").Value)
frm!Dimensions = Nz(tbl.Fields("NewDim").Value)

-- 
Val Mazur
Microsoft MVP
"Daniel" <anonymous@discussions.microsoft.com> wrote in message 
news:2EB76C11-098C-49FC-84A0-F57E574B3349@microsoft.com...
> What's this error and how do I get rid of it ?
> This error occurs at random times and mostly under Access Runtime (XP 
> Running on Win2K SP4)
>
> Here's the SUB:
>
> Sub RecalcStr(frm As Form)
>   If frm.Dirty Then frm.Dirty = False
>   Dim tbl As New ADODB.Recordset
>   tbl.Open "Select * From dbo.ItemDimWgt(" & frm!ID & ")", 
> CurrentProject.Connection, adOpenStatic, adLockReadOnly
>   frm!UnitWeight = Nz(tbl!NewWgt)            <------  Here
>   frm!Dimensions = Nz(tbl!NewDim)           <------- And Here
>   tbl.Close
> End Sub
>
> The desperate :-(
>
> 


Relevant Pages

  • Re: automatically entering specific values in a subform field
    ... I had to get rid of the blank space using the Right(... ... Private Sub Command30_Click ... Dim strResult As String ... Next I called the function GetRecordLocation from the After Update ...
    (microsoft.public.access.formscoding)
  • Re: automatically entering specific values in a subform field
    ... I had to get rid of the blank space using the Right(... ... Private Sub Command30_Click ... Dim strResult As String ... Next I called the function GetRecordLocation from the After Update ...
    (microsoft.public.access.forms)
  • Re: Creating a new object
    ... Daniel Moth wrote: ... Public Sub New ... 'This call is required by the Windows Form Designer. ... 'Add any initialization after the InitializeComponent() call ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Error handling
    ... Daniel Moth wrote: ... Public Sub New ... 'This call is required by the Windows Form Designer. ... 'Add any initialization after the InitializeComponent() call ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: color bar with pattern macro
    ... "John Mansfield" wrote: ... Sub ChangePatterns() ... Dim Srs As Series ... "Daniel" wrote: ...
    (microsoft.public.excel.charting)