converting to .snp. Urgent help needed

R

RAM

Hi all
I would like to convert the data in row into either .snp
or picture so that the data is permanent and can't be
changed by the user for peculiar reasons. and I would
like do it programatically with out user knowing it. say
i would like attach the piece of code to add record so
that i can store with out much effort.

Any help?

Thanks in advance.

R.D.CHETTY
 
J

John Nurick

Hi Ram,

..snp is a file format for reports and can't applied to individual rows
in a table or form. In principle it would be possible to store bitmap
images of data in a table instead of the data itself, but it would be an
extremely clumsy solution and it would not be possible to search, sort
or export the data in a usable form.

If you want to prevent certain users from altering certain data, this
can be done by implementing Access user-level security. Full information
is in the Access Security FAQ at
http://support.microsoft.com/default.aspx?id=207793 (this is for Access
2000 but applies to later versions too). If you decide to go this way,
read the FAQ until you understand it, plan very carefully what you need
to do, and be sure to have an up-to-date backup of the database before
you make any changes. Mistakes in implementing user-level security can
either leave the database insecure - or lock you out of it entirely.
 
R

RAM

Hi John,

After posting query here I tried to see help and I
compiled a small sub. It it working fine and iam able to
insert .snp with out users interaction:


The code I used is as follows in click event of a button
which genrally add the record data.:


Private Sub Command20_Click()
On Error GoTo Err_Command20_Click
Dim objj As String

Dim stDocName As String
stDocName = "devreport"
DoCmd.OutputTo acReport, stDocName,
acFormatSNP, "c:\dev\devreport.snp"
Snpdoc.CLASS = "SnapshotFile"
Snpdoc.OLETypeAllowed = acOLEEmbedded
Snpdoc.SourceDoc = "C:\dev\devreport.snp"
Snpdoc.Action = acOLECreateEmbed
Snpdoc.SizeMode = acOLESizeClip
///- report is generated dynamucally taking values from
the current form.-///

DoCmd.GoToRecord , , acNewRec

Exit_Command20_Click:
Exit Sub

Err_Command20_Click:
MsgBox Err.Description
Resume Exit_Command20_Click

End Sub snpdoc in a subform, if i do it from main form it
is not getting executed. I tried to use set focus etc. but
not working

Any clue


Thanks in advance

R.D.CHETTY







But if i have
-----Original Message-----
Hi Ram,

..snp is a file format for reports and can't applied to individual rows
in a table or form. In principle it would be possible to store bitmap
images of data in a table instead of the data itself, but it would be an
extremely clumsy solution and it would not be possible to search, sort
or export the data in a usable form.

If you want to prevent certain users from altering certain data, this
can be done by implementing Access user-level security. Full information
is in the Access Security FAQ at
http://support.microsoft.com/default.aspx?id=207793 (this is for Access
2000 but applies to later versions too). If you decide to go this way,
read the FAQ until you understand it, plan very carefully what you need
to do, and be sure to have an up-to-date backup of the database before
you make any changes. Mistakes in implementing user-level security can
either leave the database insecure - or lock you out of it entirely.

Hi all
I would like to convert the data in row into either .snp
or picture so that the data is permanent and can't be
changed by the user for peculiar reasons. and I would
like do it programatically with out user knowing it. say
i would like attach the piece of code to add record so
that i can store with out much effort.

Any help?

Thanks in advance.

R.D.CHETTY

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
J

John Nurick

Hi RAM,

I don't see any obvious reason why that code should work in a subform
and not in the main form, although if the code is running in the main
form and Snpdoc (which I guess is a bound objectframe) is in the
subform's you'll have to refer to it with something like
Me.SubformName.Snpdoc

But I repeat that I wouldn't do it this way myself. For one thing,
embedding documents in OLE fields in this way can cause the database
size to increase out of all proportion; for another, there's no easy way
of extracting the data from the .snp documents when needed; and - if
security is really an issue - there's nothing to stop a hacker running
the report with different data and embedding a .snp that shows that.


Hi John,

After posting query here I tried to see help and I
compiled a small sub. It it working fine and iam able to
insert .snp with out users interaction:


The code I used is as follows in click event of a button
which genrally add the record data.:


Private Sub Command20_Click()
On Error GoTo Err_Command20_Click
Dim objj As String

Dim stDocName As String
stDocName = "devreport"
DoCmd.OutputTo acReport, stDocName,
acFormatSNP, "c:\dev\devreport.snp"
Snpdoc.CLASS = "SnapshotFile"
Snpdoc.OLETypeAllowed = acOLEEmbedded
Snpdoc.SourceDoc = "C:\dev\devreport.snp"
Snpdoc.Action = acOLECreateEmbed
Snpdoc.SizeMode = acOLESizeClip
///- report is generated dynamucally taking values from
the current form.-///

DoCmd.GoToRecord , , acNewRec

Exit_Command20_Click:
Exit Sub

Err_Command20_Click:
MsgBox Err.Description
Resume Exit_Command20_Click

End Sub snpdoc in a subform, if i do it from main form it
is not getting executed. I tried to use set focus etc. but
not working

Any clue


Thanks in advance

R.D.CHETTY







But if i have
-----Original Message-----
Hi Ram,

..snp is a file format for reports and can't applied to individual rows
in a table or form. In principle it would be possible to store bitmap
images of data in a table instead of the data itself, but it would be an
extremely clumsy solution and it would not be possible to search, sort
or export the data in a usable form.

If you want to prevent certain users from altering certain data, this
can be done by implementing Access user-level security. Full information
is in the Access Security FAQ at
http://support.microsoft.com/default.aspx?id=207793 (this is for Access
2000 but applies to later versions too). If you decide to go this way,
read the FAQ until you understand it, plan very carefully what you need
to do, and be sure to have an up-to-date backup of the database before
you make any changes. Mistakes in implementing user-level security can
either leave the database insecure - or lock you out of it entirely.

Hi all
I would like to convert the data in row into either .snp
or picture so that the data is permanent and can't be
changed by the user for peculiar reasons. and I would
like do it programatically with out user knowing it. say
i would like attach the piece of code to add record so
that i can store with out much effort.

Any help?

Thanks in advance.

R.D.CHETTY

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top