From: Eric on
I created a word document that displays a userform when the template is
opened, when you click on the ok button on the userform the template should
display data that comes from a microsoft access query. The thing is that this
works perfectly for me with my non-administrators account. The problem is
that whenever another user is trying to open this template no data is being
displayed. I checked the permissions on the folder where the template is
located and that looks fine.

Anyone has any idea what I might be doing wrong here?

Thanks in advance.



From: Gordon Bentley-Mix on
Where is the database, and does everybody have permissions to it?

Might also help if we could have a look at the code you're using for the
Access query.
--
Cheers!

Gordon Bentley-Mix

"Eric" <Eric(a)discussions.microsoft.com> wrote in message
news:F2C7284B-4AE4-4D01-B78C-F43CBA81DB47(a)microsoft.com...
> I created a word document that displays a userform when the template is
> opened, when you click on the ok button on the userform the template
> should
> display data that comes from a microsoft access query. The thing is that
> this
> works perfectly for me with my non-administrators account. The problem is
> that whenever another user is trying to open this template no data is
> being
> displayed. I checked the permissions on the folder where the template is
> located and that looks fine.
>
> Anyone has any idea what I might be doing wrong here?
>
> Thanks in advance.
>
>
>
From: Eric on
This is the code behind the userform used
to retrieve the data from the access accdb:

Sub Generatecable()
'
' Generate Cable Macro

Dim DB As Database, Pay As Recordset, Vou As Recordset, SumPay As
Recordset
Set DB = OpenDatabase("q:\jas\fmc\RentalPayments\RentalPayments.accdb")
Set Pay = DB.OpenRecordset("SELECT * FROM qryCableDataLastQuarter",
dbOpenSnapshot)
Set Vou = DB.OpenRecordset("SELECT * FROM qryCableDataVoucherAmounts",
dbOpenSnapshot)
Set SumPay = DB.OpenRecordset("SELECT * FROM qryCableDataTotalAmount",
dbOpenSnapshot)

If Pay.BOF And Pay.EOF Then
MsgBox ("No data found.")
GoTo exit_sub
End If

Dim PayRecs As Long, VouRecs As Long
Pay.MoveLast
PayRecs = Pay.RecordCount
Vou.MoveLast
VouRecs = Vou.RecordCount


Note: none of my users get to see the USERFORM upon opening the template.
They all have sufficient permissions to the access database.

Thanks


"Gordon Bentley-Mix" wrote:

> Where is the database, and does everybody have permissions to it?
>
> Might also help if we could have a look at the code you're using for the
> Access query.
> --
> Cheers!
>
> Gordon Bentley-Mix
>
> "Eric" <Eric(a)discussions.microsoft.com> wrote in message
> news:F2C7284B-4AE4-4D01-B78C-F43CBA81DB47(a)microsoft.com...
> > I created a word document that displays a userform when the template is
> > opened, when you click on the ok button on the userform the template
> > should
> > display data that comes from a microsoft access query. The thing is that
> > this
> > works perfectly for me with my non-administrators account. The problem is
> > that whenever another user is trying to open this template no data is
> > being
> > displayed. I checked the permissions on the folder where the template is
> > located and that looks fine.
> >
> > Anyone has any idea what I might be doing wrong here?
> >
> > Thanks in advance.
> >
> >
> >
From: Eric on
I managed so that all users see the userform but when generating the document
and trying to open the database I get the following error message: USER
DEFINED TYPE IS NOT DEFINED. The program stops at Dim db as Database

"Eric" wrote:

> This is the code behind the userform used
> to retrieve the data from the access accdb:
>
> Sub Generatecable()
> '
> ' Generate Cable Macro
>
> Dim DB As Database, Pay As Recordset, Vou As Recordset, SumPay As
> Recordset
> Set DB = OpenDatabase("q:\jas\fmc\RentalPayments\RentalPayments.accdb")
> Set Pay = DB.OpenRecordset("SELECT * FROM qryCableDataLastQuarter",
> dbOpenSnapshot)
> Set Vou = DB.OpenRecordset("SELECT * FROM qryCableDataVoucherAmounts",
> dbOpenSnapshot)
> Set SumPay = DB.OpenRecordset("SELECT * FROM qryCableDataTotalAmount",
> dbOpenSnapshot)
>
> If Pay.BOF And Pay.EOF Then
> MsgBox ("No data found.")
> GoTo exit_sub
> End If
>
> Dim PayRecs As Long, VouRecs As Long
> Pay.MoveLast
> PayRecs = Pay.RecordCount
> Vou.MoveLast
> VouRecs = Vou.RecordCount
>
>
> Note: none of my users get to see the USERFORM upon opening the template.
> They all have sufficient permissions to the access database.
>
> Thanks
>
>
> "Gordon Bentley-Mix" wrote:
>
> > Where is the database, and does everybody have permissions to it?
> >
> > Might also help if we could have a look at the code you're using for the
> > Access query.
> > --
> > Cheers!
> >
> > Gordon Bentley-Mix
> >
> > "Eric" <Eric(a)discussions.microsoft.com> wrote in message
> > news:F2C7284B-4AE4-4D01-B78C-F43CBA81DB47(a)microsoft.com...
> > > I created a word document that displays a userform when the template is
> > > opened, when you click on the ok button on the userform the template
> > > should
> > > display data that comes from a microsoft access query. The thing is that
> > > this
> > > works perfectly for me with my non-administrators account. The problem is
> > > that whenever another user is trying to open this template no data is
> > > being
> > > displayed. I checked the permissions on the folder where the template is
> > > located and that looks fine.
> > >
> > > Anyone has any idea what I might be doing wrong here?
> > >
> > > Thanks in advance.
> > >
> > >
> > >
From: Gordon Bentley-Mix on
Do you have a reference to the DAO Object Library? Does this library exist
on the users' machines? Try putting each variable in a separate Dim
statement and qualifying each with "DAO.". Then see which variable - if
any - is throwing the error.
--
Cheers!

Gordon Bentley-Mix

"Eric" <Eric(a)discussions.microsoft.com> wrote in message
news:5B57398C-9BA6-4A7C-AB35-88910CC45A0A(a)microsoft.com...
> I managed so that all users see the userform but when generating the
> document
> and trying to open the database I get the following error message: USER
> DEFINED TYPE IS NOT DEFINED. The program stops at Dim db as Database
>
> "Eric" wrote:
>
>> This is the code behind the userform used
>> to retrieve the data from the access accdb:
>>
>> Sub Generatecable()
>> '
>> ' Generate Cable Macro
>>
>> Dim DB As Database, Pay As Recordset, Vou As Recordset, SumPay As
>> Recordset
>> Set DB =
>> OpenDatabase("q:\jas\fmc\RentalPayments\RentalPayments.accdb")
>> Set Pay = DB.OpenRecordset("SELECT * FROM qryCableDataLastQuarter",
>> dbOpenSnapshot)
>> Set Vou = DB.OpenRecordset("SELECT * FROM
>> qryCableDataVoucherAmounts",
>> dbOpenSnapshot)
>> Set SumPay = DB.OpenRecordset("SELECT * FROM
>> qryCableDataTotalAmount",
>> dbOpenSnapshot)
>>
>> If Pay.BOF And Pay.EOF Then
>> MsgBox ("No data found.")
>> GoTo exit_sub
>> End If
>>
>> Dim PayRecs As Long, VouRecs As Long
>> Pay.MoveLast
>> PayRecs = Pay.RecordCount
>> Vou.MoveLast
>> VouRecs = Vou.RecordCount
>>
>>
>> Note: none of my users get to see the USERFORM upon opening the template.
>> They all have sufficient permissions to the access database.
>>
>> Thanks
>>
>>
>> "Gordon Bentley-Mix" wrote:
>>
>> > Where is the database, and does everybody have permissions to it?
>> >
>> > Might also help if we could have a look at the code you're using for
>> > the
>> > Access query.
>> > --
>> > Cheers!
>> >
>> > Gordon Bentley-Mix
>> >
>> > "Eric" <Eric(a)discussions.microsoft.com> wrote in message
>> > news:F2C7284B-4AE4-4D01-B78C-F43CBA81DB47(a)microsoft.com...
>> > > I created a word document that displays a userform when the template
>> > > is
>> > > opened, when you click on the ok button on the userform the template
>> > > should
>> > > display data that comes from a microsoft access query. The thing is
>> > > that
>> > > this
>> > > works perfectly for me with my non-administrators account. The
>> > > problem is
>> > > that whenever another user is trying to open this template no data is
>> > > being
>> > > displayed. I checked the permissions on the folder where the template
>> > > is
>> > > located and that looks fine.
>> > >
>> > > Anyone has any idea what I might be doing wrong here?
>> > >
>> > > Thanks in advance.
>> > >
>> > >
>> > >