Re: ADO -DAO problem?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Gerry,
actually the name property return the name of the i field in the field
collection where i is the index of the field. I'm pretty sure that
public_banker IS the name of your field! So what's the purpose of extracting
a name that you already know?
BTW the error is raised because the index must be a number so in your
example MsgBox (myRecordSet.Fields(0).Name) will return public_banker 'cause
public_banker is the first field in your data collection and the index begin
with 0 so the first field is identified by the index 0, the second field by
the index 1 and so on.

Cheers Paolo

"Gerry" wrote:

Paolo,
myRecordSet.Open mysql
myRecordSet.Fields(public_banker).Name
MsgBox (myRecordSet.Fields(0).Name)

I have again a compile error: invalid use of property on
Name in
myRecordSet.Fields(public_banker).Name

Gerry

.



Relevant Pages

  • Re: Search Feature
    ... When I replaced the code it gives me a VB Compile Error: ... Dim strSearch As String ... 'Check txtSearch for Null value or Nill Entry first. ... MsgBox "Please enter a value!", vbOKOnly, "Invalid Search ...
    (microsoft.public.access.forms)
  • RE: Forcing All records in a Continuous form to be populated
    ... MsgBox "Please Input All Serial Numbers" ... This works to an extend, if the first field is null, I cant move to the ... Exit Sub ... with the debug highlighting the acNext Line. ...
    (microsoft.public.access.formscoding)
  • Re: isnumeric compile error...
    ... A97 complains of a compile error. ... MsgBox "Numeric" ... I entered 1.2.2 and I got "Alpha". ... immedicate window. ...
    (comp.databases.ms-access)
  • Re: isnumeric compile error...
    ... A97 complains of a compile error. ... Private Sub Text2_AfterUpdate ... MsgBox "Numeric" ... I entered 1.2.2 and I got "Alpha". ...
    (comp.databases.ms-access)
  • Re: worksheet_calculation problem
    ... Private Sub Worksheet_Calculate ... MsgBox "Please enter correct postal code" ... then changes code for sheetas follow: ... and now I get a compile error: Copmile error in hidden module: hseet 4 ...
    (microsoft.public.excel.programming)