"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
Go Back  Xtreme Visual Basic Talk > > > "Method 'Value' of Object 'Field' failed"


Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2004, 12:24 AM
uncle_scrooge uncle_scrooge is offline
Regular
 
Join Date: Feb 2004
Posts: 82
Angry "Method 'Value' of Object 'Field' failed"


"Method 'Value' of Object 'Field' failed"

I get this error when iam looping trough my access database. The field "Brand" is text.

Do While Not rstResults.Fields("Brand").Value = ""
rstResults.Fields("wcalc").Value = ((rstResults.Fields("Value (Euro)").Value) * (rstResults.Fields("Wgtd#").Value))
rstResults.Fields("unwcalc").Value = ((rstResults.Fields("Units").Value) * (rstResults.Fields("Unw#").Value))
rstResults.Update
rstResults.MoveNext
Loop
Reply With Quote
  #2  
Old 02-26-2004, 06:59 AM
MKoslof's Avatar
MKoslof"Method 'Value' of Object 'Field' failed" MKoslof is offline
Cum Grano Salis

Retired Moderator
* Guru *
 
Join Date: Jul 2002
Location: Baltimore, Maryland
Posts: 14,636
Default

You don't want to loop the recordset value. Because if it is currently empty, you are stuck in a loop...this isn't good practice. What you want to do is open your recordset. Loop the RECORDSET object until EOF. Then as an if statment, check the value of rs.fields("whatever"). If it is null, act accordingly, if not, move on to the next record in the collection, this continues until EOF.
__________________
"Artificial Intelligence is no match for natural stupidity." ~unknown
Reply With Quote
  #3  
Old 03-01-2004, 09:15 PM
randem randem is offline
Privileges Suspended
 
Join Date: Dec 2003
Location: Lahaina, Hawaii
Posts: 297
Default

uncle_scrooge

Read this to help you futher your database skills: http://www.innoscript.com/support.html under the title of 'Database Problems?'
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing entire objects to a file? MoNoXBooGIE General 14 04-20-2004 07:21 PM
Null value in OLE Object type field lgarcia3 Database and Reporting 1 01-08-2004 10:52 AM
Error :"Method PrintOut of object Sheets failed" chemburkar Excel 1 12-08-2003 09:25 PM
File System Object (Code for the masses) Aquila General 2 07-25-2003 10:10 AM
VB6 linking picturebox/image to OLE Object field to show image alanfish Word, PowerPoint, Outlook, and Other Office Products 0 05-14-2003 03:58 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed" "Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
 
"Method 'Value' of Object 'Field' failed"
"Method 'Value' of Object 'Field' failed"
 
-->