Connecting Tech Pros Worldwide Forums | Help | Site Map

Data member not found

Nick J
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi,

I keep getting this error message, Compile Error: Method or Data Member not
found when trying to compile my access 2000 database ( I want to make an MDE
file) although I do not receive this error when compiling the code from the
same program in Access 2002 (XP)

I keep getting the error on Me.txtTracking, it DOES exist. I just can't get
my head around this problem, could anyone help me out?

code:
Private Sub cmdOk_Click()
Dim strsql As String
CurrentDb.Execute "Update [tblDownload] Set DESPATCHED = True, TRACKING =
""" & Me.txtTracking & """, DESPDATE = """ & Me.txtDate & """, TODAYDATE =
""" & Me.txtTodayDate & """, Courier = """ & Me.cmbDeliveryMethod & """
Where ID = " & Me.txtOrderNumber & ";", dbfailonerror
Me.StatusListBox.AddItem "ORDER # " & Me.txtOrderNumber & " DESPATCHED AND
ALLOCATED TRACKING #" & Me.txtTracking & "", 0

End Sub

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading



RoyVidar
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Data member not found


Hi!

It's probably the .AddItem method, which wasn't
introduced until the xp (2002) version.

I think you'll need to populate the list/combo
trhough other means, for instance concatenate
this item with the rowsource of the list/combo

Roy-Vidar



Nick J wrote:[color=blue]
> Hi,
>
> I keep getting this error message, Compile Error: Method or Data[/color]
Member not[color=blue]
> found when trying to compile my access 2000 database ( I want to make[/color]
an MDE[color=blue]
> file) although I do not receive this error when compiling the code[/color]
from the[color=blue]
> same program in Access 2002 (XP)
>
> I keep getting the error on Me.txtTracking, it DOES exist. I just[/color]
can't get[color=blue]
> my head around this problem, could anyone help me out?
>
> code:
> Private Sub cmdOk_Click()
> Dim strsql As String
> CurrentDb.Execute "Update [tblDownload] Set DESPATCHED = True,[/color]
TRACKING =[color=blue]
> """ & Me.txtTracking & """, DESPDATE = """ & Me.txtDate & """,[/color]
TODAYDATE =[color=blue]
> """ & Me.txtTodayDate & """, Courier = """ & Me.cmbDeliveryMethod &[/color]
"""[color=blue]
> Where ID = " & Me.txtOrderNumber & ";", dbfailonerror
> Me.StatusListBox.AddItem "ORDER # " & Me.txtOrderNumber & "[/color]
DESPATCHED AND[color=blue]
> ALLOCATED TRACKING #" & Me.txtTracking & "", 0
>
> End Sub
>
> --
>
> Kind Regards...
>
> Customer Services Team
> Blue Bell Trading
>
> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT[/color]
FOR[color=blue]
> REFERENCE +++
>
> Blue Bell Trading[/color]

Nick J
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Data member not found


Hi Roy,

I see, thanks for your help.

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
"RoyVidar" <roy_vidar@yahoo.no> wrote in message
news:1113651339.130152.38190@l41g2000cwc.googlegro ups.com...[color=blue]
> Hi!
>
> It's probably the .AddItem method, which wasn't
> introduced until the xp (2002) version.
>
> I think you'll need to populate the list/combo
> trhough other means, for instance concatenate
> this item with the rowsource of the list/combo
>
> Roy-Vidar
>
>
>
> Nick J wrote:[color=green]
>> Hi,
>>
>> I keep getting this error message, Compile Error: Method or Data[/color]
> Member not[color=green]
>> found when trying to compile my access 2000 database ( I want to make[/color]
> an MDE[color=green]
>> file) although I do not receive this error when compiling the code[/color]
> from the[color=green]
>> same program in Access 2002 (XP)
>>
>> I keep getting the error on Me.txtTracking, it DOES exist. I just[/color]
> can't get[color=green]
>> my head around this problem, could anyone help me out?
>>
>> code:
>> Private Sub cmdOk_Click()
>> Dim strsql As String
>> CurrentDb.Execute "Update [tblDownload] Set DESPATCHED = True,[/color]
> TRACKING =[color=green]
>> """ & Me.txtTracking & """, DESPDATE = """ & Me.txtDate & """,[/color]
> TODAYDATE =[color=green]
>> """ & Me.txtTodayDate & """, Courier = """ & Me.cmbDeliveryMethod &[/color]
> """[color=green]
>> Where ID = " & Me.txtOrderNumber & ";", dbfailonerror
>> Me.StatusListBox.AddItem "ORDER # " & Me.txtOrderNumber & "[/color]
> DESPATCHED AND[color=green]
>> ALLOCATED TRACKING #" & Me.txtTracking & "", 0
>>
>> End Sub
>>
>> --
>>
>> Kind Regards...
>>
>> Customer Services Team
>> Blue Bell Trading
>>
>> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT[/color]
> FOR[color=green]
>> REFERENCE +++
>>
>> Blue Bell Trading[/color]
>[/color]


Allen Browne
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Data member not found


Hi Nick

You can get this error message if *any* of the controls referred to in this
statement are invalid. Access will often highlight one of the controls that
is too early.

For example, it could be txtDate that does not exist.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nick J" <bluebelltrading@blueyonder.co.uk> wrote in message
news:Sq68e.52955$mV1.51900@fe3.news.blueyonder.co. uk...[color=blue]
>
> I keep getting this error message, Compile Error: Method or Data Member
> not found when trying to compile my access 2000 database ( I want to make
> an MDE file) although I do not receive this error when compiling the code
> from the same program in Access 2002 (XP)
>
> I keep getting the error on Me.txtTracking, it DOES exist. I just can't
> get my head around this problem, could anyone help me out?
>
> code:
> Private Sub cmdOk_Click()
> Dim strsql As String
> CurrentDb.Execute "Update [tblDownload] Set DESPATCHED = True, TRACKING =
> """ & Me.txtTracking & """, DESPDATE = """ & Me.txtDate & """, TODAYDATE =
> """ & Me.txtTodayDate & """, Courier = """ & Me.cmbDeliveryMethod & """
> Where ID = " & Me.txtOrderNumber & ";", dbfailonerror
> Me.StatusListBox.AddItem "ORDER # " & Me.txtOrderNumber & " DESPATCHED AND
> ALLOCATED TRACKING #" & Me.txtTracking & "", 0
>
> End Sub
>
> --
>
> Kind Regards...
>
> Customer Services Team
> Blue Bell Trading
>
> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
> REFERENCE +++
>
> Blue Bell Trading[/color]


Nick J
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Data member not found


Hi Allen,

I have checked over doxens of times and they all exist.

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
news:4261326f$0$18110$5a62ac22@per-qv1-newsreader-01.iinet.net.au...[color=blue]
> Hi Nick
>
> You can get this error message if *any* of the controls referred to in
> this statement are invalid. Access will often highlight one of the
> controls that is too early.
>
> For example, it could be txtDate that does not exist.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Nick J" <bluebelltrading@blueyonder.co.uk> wrote in message
> news:Sq68e.52955$mV1.51900@fe3.news.blueyonder.co. uk...[color=green]
>>
>> I keep getting this error message, Compile Error: Method or Data Member
>> not found when trying to compile my access 2000 database ( I want to make
>> an MDE file) although I do not receive this error when compiling the code
>> from the same program in Access 2002 (XP)
>>
>> I keep getting the error on Me.txtTracking, it DOES exist. I just can't
>> get my head around this problem, could anyone help me out?
>>
>> code:
>> Private Sub cmdOk_Click()
>> Dim strsql As String
>> CurrentDb.Execute "Update [tblDownload] Set DESPATCHED = True, TRACKING =
>> """ & Me.txtTracking & """, DESPDATE = """ & Me.txtDate & """, TODAYDATE
>> = """ & Me.txtTodayDate & """, Courier = """ & Me.cmbDeliveryMethod & """
>> Where ID = " & Me.txtOrderNumber & ";", dbfailonerror
>> Me.StatusListBox.AddItem "ORDER # " & Me.txtOrderNumber & " DESPATCHED
>> AND ALLOCATED TRACKING #" & Me.txtTracking & "", 0
>>
>> End Sub
>>
>> --
>>
>> Kind Regards...
>>
>> Customer Services Team
>> Blue Bell Trading
>>
>> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
>> REFERENCE +++
>>
>> Blue Bell Trading[/color]
>
>[/color]


Allen Browne
Guest
 
Posts: n/a
#6: Nov 13 '05

re: Data member not found


Suggestions to debug this.

1. Break the line into parts:
strsql = "Update [tblDownload] Set DESPATCHED = True, TRACKING = """ &
Me.txtTracking

If that works, comment it out, and try:
strsql = "DESPDATE = """ & Me.txtDate
and so on, until if finds the offender.

2. If you are referring to a field that is present in the form's
RecordSource but it is not also a control on the form, try a bang instead of
a dot, e.g.:
Me!txtDate
The compiler is less stringent with the bang. There are cases where you need
to refer to an AccessField object like that in order for the code to
compile.

3. If neither of the above can trace the problem, it may be a Name
AutoCorrect problem. Details:
http://allenbrowne.com/bug-03.html


--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nick J" <bluebelltrading@blueyonder.co.uk> wrote in message
news:nNa8e.53400$mV1.9783@fe3.news.blueyonder.co.u k...[color=blue]
> Hi Allen,
>
> I have checked over doxens of times and they all exist.
>
> --
>
> Kind Regards...
>
> Customer Services Team
> Blue Bell Trading
>
> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
> REFERENCE +++
>
> Blue Bell Trading
> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
> news:4261326f$0$18110$5a62ac22@per-qv1-newsreader-01.iinet.net.au...[color=green]
>> Hi Nick
>>
>> You can get this error message if *any* of the controls referred to in
>> this statement are invalid. Access will often highlight one of the
>> controls that is too early.
>>
>> For example, it could be txtDate that does not exist.
>>
>>
>> "Nick J" <bluebelltrading@blueyonder.co.uk> wrote in message
>> news:Sq68e.52955$mV1.51900@fe3.news.blueyonder.co. uk...[color=darkred]
>>>
>>> I keep getting this error message, Compile Error: Method or Data Member
>>> not found when trying to compile my access 2000 database ( I want to
>>> make an MDE file) although I do not receive this error when compiling
>>> the code from the same program in Access 2002 (XP)
>>>
>>> I keep getting the error on Me.txtTracking, it DOES exist. I just can't
>>> get my head around this problem, could anyone help me out?
>>>
>>> code:
>>> Private Sub cmdOk_Click()
>>> Dim strsql As String
>>> CurrentDb.Execute "Update [tblDownload] Set DESPATCHED = True, TRACKING
>>> = """ & Me.txtTracking & """, DESPDATE = """ & Me.txtDate & """,
>>> TODAYDATE = """ & Me.txtTodayDate & """, Courier = """ &
>>> Me.cmbDeliveryMethod & """ Where ID = " & Me.txtOrderNumber & ";",
>>> dbfailonerror
>>> Me.StatusListBox.AddItem "ORDER # " & Me.txtOrderNumber & " DESPATCHED
>>> AND ALLOCATED TRACKING #" & Me.txtTracking & "", 0
>>>
>>> End Sub
>>>
>>> --
>>>
>>> Kind Regards...
>>>
>>> Customer Services Team
>>> Blue Bell Trading
>>>
>>> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
>>> REFERENCE +++
>>>
>>> Blue Bell Trading[/color][/color][/color]


Nick J
Guest
 
Posts: n/a
#7: Nov 13 '05

re: Data member not found


Hi Allen,

Thanks for your help. I have failed on all accounts and I must put it down
to Access 2000 and AddItem. The first line is fine, it is the line below
that is the problem...

Me.StatusListBox.AddItem "ORDER # " & Me!txtOrderNumber & " DESPATCHED BY "
& Me!txtOrderNumber & "", 0

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
news:4261ff7d$0$9233$5a62ac22@per-qv1-newsreader-01.iinet.net.au...[color=blue]
> Suggestions to debug this.
>
> 1. Break the line into parts:
> strsql = "Update [tblDownload] Set DESPATCHED = True, TRACKING = """ &
> Me.txtTracking
>
> If that works, comment it out, and try:
> strsql = "DESPDATE = """ & Me.txtDate
> and so on, until if finds the offender.
>
> 2. If you are referring to a field that is present in the form's
> RecordSource but it is not also a control on the form, try a bang instead
> of a dot, e.g.:
> Me!txtDate
> The compiler is less stringent with the bang. There are cases where you
> need to refer to an AccessField object like that in order for the code to
> compile.
>
> 3. If neither of the above can trace the problem, it may be a Name
> AutoCorrect problem. Details:
> http://allenbrowne.com/bug-03.html
>
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Nick J" <bluebelltrading@blueyonder.co.uk> wrote in message
> news:nNa8e.53400$mV1.9783@fe3.news.blueyonder.co.u k...[color=green]
>> Hi Allen,
>>
>> I have checked over doxens of times and they all exist.
>>
>> --
>>
>> Kind Regards...
>>
>> Customer Services Team
>> Blue Bell Trading
>>
>> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
>> REFERENCE +++
>>
>> Blue Bell Trading
>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
>> news:4261326f$0$18110$5a62ac22@per-qv1-newsreader-01.iinet.net.au...[color=darkred]
>>> Hi Nick
>>>
>>> You can get this error message if *any* of the controls referred to in
>>> this statement are invalid. Access will often highlight one of the
>>> controls that is too early.
>>>
>>> For example, it could be txtDate that does not exist.
>>>
>>>
>>> "Nick J" <bluebelltrading@blueyonder.co.uk> wrote in message
>>> news:Sq68e.52955$mV1.51900@fe3.news.blueyonder.co. uk...
>>>>
>>>> I keep getting this error message, Compile Error: Method or Data Member
>>>> not found when trying to compile my access 2000 database ( I want to
>>>> make an MDE file) although I do not receive this error when compiling
>>>> the code from the same program in Access 2002 (XP)
>>>>
>>>> I keep getting the error on Me.txtTracking, it DOES exist. I just can't
>>>> get my head around this problem, could anyone help me out?
>>>>
>>>> code:
>>>> Private Sub cmdOk_Click()
>>>> Dim strsql As String
>>>> CurrentDb.Execute "Update [tblDownload] Set DESPATCHED = True, TRACKING
>>>> = """ & Me.txtTracking & """, DESPDATE = """ & Me.txtDate & """,
>>>> TODAYDATE = """ & Me.txtTodayDate & """, Courier = """ &
>>>> Me.cmbDeliveryMethod & """ Where ID = " & Me.txtOrderNumber & ";",
>>>> dbfailonerror
>>>> Me.StatusListBox.AddItem "ORDER # " & Me.txtOrderNumber & " DESPATCHED
>>>> AND ALLOCATED TRACKING #" & Me.txtTracking & "", 0
>>>>
>>>> End Sub
>>>>
>>>> --
>>>>
>>>> Kind Regards...
>>>>
>>>> Customer Services Team
>>>> Blue Bell Trading
>>>>
>>>> +++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT
>>>> FOR REFERENCE +++
>>>>
>>>> Blue Bell Trading[/color][/color]
>
>[/color]


pietlinden@hotmail.com
Guest
 
Posts: n/a
#8: Nov 13 '05

re: Data member not found


Maybe it's me, but I don't remember listboxes in A2K supporting the
..AddItem method. You'd have to bind the listbox to a table or
something and then refresh it. But then maybe I'm completely senile...

Closed Thread