Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make an Access 2007 application work

Status
Not open for further replies.

valgore

Technical User
Nov 12, 2008
180
US
hello, i have created a database that allows users to logon and input their Amex charges. i created a run-time application and i installed it on one of the users PC's. my problem is that when i open it, nothing shows up. so i have several questions on where to go from there.

1) i created an AutoExec macro that runs the Logon form when the database opens. how do i put that on the application side?
2) is it possible to have different tables open for different users? i want to have some tables be edit/add only, and some read only depending on the User.
3) im not very good at all with VBA. how do i make it so when they logon, a table or form opens?
 
1. What do you mean by "the application side?"
Access files need to be in a trusted location for macros and VBA code to run properly, use Office menu (yellow button) -> Access options -> Trust Center -> Trust Center Settings -> Trusted Locations.

Your alternative is to buy a code signing certificate and sign your databases when ready for deployment, but that is expensive.

2. I presume you mean different permissions for different users. It is possible, but requires a bit of programming to set up.
If you want to have different tables for different users, again its possible but it makes producing reports that combine all the data unnecessarily complex.

3. With your database open:
Office (yellow button) menu, Access Options, Current Database.
Choose the form you want to open at startup.

John
 
sorry. what i mean't by application side was the Front End. i already split the database into a backend and front end.
for question 2, let me tell you what i already have set up. i set a logon screen to pop up when the user runs the application. when they logon, a form pops up with 4 or 5 buttons. what i was thinking was to add a column to my Username and Password table that was labeled security code and have a different number there for each user from 1-6. what i was thinking was to make a tempvar that looked at the security code number and if it was a 4, lets say, then when they log in and the form pops up, some buttons would be greyed out so they couldn't use those buttons. does that make sense? if i made one User admin, could you run reports and things as a admin? or would it not work? and number 3 is fixed.

Thanks,
Valgore
 
That would work - giving your security code different permissions within the system.
You need to be sure though that people are running it through a runtime environment to ensure that the data remains secure and they can't easily bypass this or change their own security group type.
If your users can access the tables directly, this is a very insecure approach as it can be easily bypassed.

John
 
i already set up a run-time. the users can't directly access the tables. the only thing they can click on are the buttons on the form. so, i will mess around with seting a tempvar and if i have any problems i will post it
Thanks for you help!

Valgore
 
so i made a macro that sets the tempvar, but im having problems with the syntax. so what i want to do is say
if the security code is 1 then disable the import button. so i tried
Code:
importbutton.enabled = false
but i keep getting an error. ive look all over the internet and people are saying that's the correct syntax to enable/disable a button.

Valgore
 
so if i make a code in a form public then another forms code can see the variables in the other form right?
 
Yes that's right. Its better to put code that is shared into a dedicated module then call it from your form rather than make modules within a form or report public.

John
 
ok. well thank you so much. you were a big help

Valgore
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top