Re: Microsoft Office updates that are not backward compatable with Microsoft VB 6.5
- From: "kim.forbes@xxxxxxxxxxxxxxxxxxxxx" <kim.forbes@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 9 Oct 2008 09:25:58 -0700 (PDT)
On Oct 9, 9:49 am, "Norman Yuan" <FakeN...@xxxxxxxxxxxxx> wrote:
Also, in VB/A
Dim rst, rstFill As ADODB.Recordset
is different from
Dim rst As ADODB.Recordset
Dim rstFill As ADODB.Recordset
For the former,
rst is declared as Variant, since no type is specified with "As" keyword.
That is, in VB, any variable declared without "As" will be Variant, whether
it is declared in the same line of code, seperated with "," or not. For
better readability and for the explicity, I never declare variable in one
line of code in VB.
<kim.for...@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:df3f7d4b-540d-4866-a65e-cadd5f3a7c41@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am a VB and VBA novice who inherited an Access Database with VB code
that suddenly doesn't work on any machine or for any backup. I've
looked at the code and to my novice eyes it seems OK. I was wondering
if there was any VB or VBA change that would make this code suddenly
break. The first error I get is:
"Duplicate Declaration for current scope"
There are the duplications:
Private Sub txtSearchVal_Change()
Dim rst, rstFill As ADODB.Recordset
Dim sqlQuery, fillQuery As String
Dim ChurchID, envYear As Integer
Dim ChurchID As Integer
Dim identifier As Variant
Dim msgOK, intPosition As Integer
Dim LastName, firstName As String
Dim idType As Integer
I see that ChurchID is a duplicate declaration; but everything worked
fine until about a month and 1/2 ago, any ideas why it suddenly isn't
working?
Thanks- Hide quoted text -
- Show quoted text -
Thanks for the replys.
I made the changes and got an "invalid method" error. I replaced the
me.field references with me!references and everything works find now.
Thanks again!
Kim
.
- References:
- Microsoft Office updates that are not backward compatable with Microsoft VB 6.5
- From: kim.forbes@xxxxxxxxxxxxxxxxxxxxx
- Re: Microsoft Office updates that are not backward compatable with Microsoft VB 6.5
- From: Norman Yuan
- Microsoft Office updates that are not backward compatable with Microsoft VB 6.5
- Prev by Date: Re: Microsoft Office updates that are not backward compatable with Microsoft VB 6.5
- Next by Date: A way to convert an excel attachment to XML spreadsheet representa
- Previous by thread: Re: Microsoft Office updates that are not backward compatable with Microsoft VB 6.5
- Next by thread: Get specific excel instance/process
- Index(es):
Relevant Pages
|