|
-
Jan 12th, 2007, 03:22 PM
#1
Thread Starter
New Member
Open secured password MS access database
Hi,
Question1:
If my MS access data is not secured by a password, I can use this code to open it: Data1.DatabaseName = App.path & "\MyParts.mdb"
Now I set the MyParts.mdb to prompt a password to open it. Of course, that code above cannot open it any more.
Question 2:
I want to highlight whole row (or fileds) of the table where the arrow pointed to the records found.
Question3:
The records found is saved to a text file name Records.txt. I want the program to save or convert the file to .pdf extension so that no one can edit it.
I am a beginner in VB, so any help will be appreciated.
Sincerely,
Mike
-
Jan 12th, 2007, 03:43 PM
#2
Re: Open secured password MS access database
 Originally Posted by Mike Phan
Question1:
If my MS access data is not secured by a password, I can use this code to open it: Data1.DatabaseName = App.path & "\MyParts.mdb"
Not exactly. That's part of the connection string. Look at these connection strings - for Access and Access 2007.
Now I set the MyParts.mdb to prompt a password to open it. Of course, that code above cannot open it any more.
Not unless your program gets the correct password. Use the first connection string and change the right end to
VB Code:
Pwd=" & txtPassword.Text & ";"
Question 2:
I want to highlight whole row (or fileds) of the table where the arrow pointed to the records found.
If you're running a VB program the table isn't showing on the screen the way it does when you run Access. You can retrieve a row (or a lot of rows). If you want to display it (them) you'll need a grid or a bunch of text boxes or labels on your form to put the retrieved data into.
Question3:
The records found is saved to a text file name Records.txt. I want the program to save or convert the file to .pdf extension so that no one can edit it.
You can buy controls that will write .pdf files. Crystal Controls can write them. VB can't natively write them.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|