dbTalk Databases Forums  

Unexplained Compile Error?

comp.databases.ms-access comp.databases.ms-access


Discuss Unexplained Compile Error? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
(PeteCresswell)
 
Posts: n/a

Default Unexplained Compile Error? - 12-24-2011 , 09:01 AM






I've got a line of code that opens a form - passing a sizable
string in .OpenArgs.

One of the references has started throwing a "Method or data
member not found" compile error and I can't figure out why.

The offending code:
--------------------------------------------------------------
DoCmd.OpenForm "frmTrancheTransactionEntry", , , , , acDialog,
gTradeScreenMode_Change & gPipe & .txtTradeTypeID & gPipe & 0 &
gPipe & 0 & gPipe & 0 & gPipe & 0 & gPipe & .txtRecordNumberID &
gPipe & .Name
--------------------------------------------------------------

Rem-ing out part of the argument string makes the error go away
as in:
--------------------------------------------------------------
DoCmd.OpenForm "frmTrancheTransactionEntry", , , , , acDialog,
gTradeScreenMode_Change & gPipe & .txtTradeTypeID & gPipe & 0 &
gPipe & 0 & gPipe & 0 & gPipe & 0 & gPipe ' &
..txtRecordNumberID & gPipe & .Name
--------------------------------------------------------------

Here's a screen shot of the error: http://tinyurl.com/7vkosyp

One would think that .txtTradeTypeID is a bad reference, but it
really does exist and the compiler buys off on a reference
outside of the .OpenForm OpenArgs string yet within the same
"With Me" block.

I'm getting desperate....
--
Pete Cresswell

Reply With Quote
  #2  
Old   
(PeteCresswell)
 
Posts: n/a

Default Re: Unexplained Compile Error? - 12-24-2011 , 09:12 AM






Per (PeteCresswell):
Quote:
One would think that .txtTradeTypeID is a bad reference

Got it!....

..txtRecordNumberID shb .txtRecordNumber.

Turns out that the compiler does *not* necessarily highlight the
offending reference.
--
Pete Cresswell

Reply With Quote
  #3  
Old   
Tony Toews
 
Posts: n/a

Default Re: Unexplained Compile Error? - 12-25-2011 , 05:55 PM



On Sat, 24 Dec 2011 10:12:10 -0500, "(PeteCresswell)" <x@y.Invalid>
wrote:

Quote:
One would think that .txtTradeTypeID is a bad reference


Got it!....

.txtRecordNumberID shb .txtRecordNumber.

Turns out that the compiler does *not* necessarily highlight the
offending reference.
Yes, there's a bug in the compiler in some of those expressions where
it highlights the expression to the left. Or to the right. I forget
which. <smile>

Tony
Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #4  
Old   
Tony Toews
 
Posts: n/a

Default Re: Unexplained Compile Error? - 12-25-2011 , 06:00 PM



On Sun, 25 Dec 2011 16:55:05 -0700, Tony Toews
<ttoews (AT) telusplanet (DOT) net> wrote:

Quote:
Yes, there's a bug in the compiler in some of those expressions where
it highlights the expression to the left. Or to the right. I forget
which. <smile
Ahh, I thought I had mentioned it once.
http://msmvps.com/blogs/access/archi...not-found.aspx

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
Reply




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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.