Question about Microsoft Office Access 2003 (077-02871) for PC

1 Answer

Access 2003 HELP PLEASE!

I am an expert user of Access but very green when it comes to code. I have a problem with a canteen databse I am designing. In short, each employee is listed in tblEmployees - they have a field (among others) for Username and Lunch Password and Visitor Allowed (some employees are allowed to order lunch for guests on the company account - I have made this a yes/no data type). I have created a parameter query as the source for the lunch order from so it that triggers the employee to enter their username and password. The subform contains the lunch order fields from tblLunchOrders. The problem is that - when this form is accessed from the switchboard - I need it to do 2 things...

  1. Check that they have entered a password that is on the list - If not it should bring up a message and not open the form. I tried adding this code to the main forms "On Load" property...
Private Sub Form_Load()
If IsNull(Lunch_Password) Then
MsgBox ("Incorrect User Name or Password. Please try again.")
On Error GoTo Err_Command67_Click


DoCmd.Close

Exit_Command67_Click:
Exit Sub

Err_Command67_Click:
MsgBox Err.Description
Resume Exit_Command67_Click
End If
End Sub

  1. If the password is correct they might still not be authorised to order lunch for a guest so after checking the password it needs to check and see if the 'Visitor Allowed' field is switched on - if it is... it must open the form... if not it must bring up a msg and not open the form. I tried adding the following code in conjunction with the above on the main form (it didn't work) so I tried adding the code to the "On Load" property of the subform...
Private Sub Form_Load()
If Visitor_Allowed = 0 Then
MsgBox ("You are not authorised to order lunch for a visitor. Please contact accounts if you have any queries.")
End If
End Sub

Any suggestions. This database needs to go live tomorrow morning! It's now 8:30pm in SA. I am desperate and feeling very blonde and out of my depth. Would really appreciate the correct code. Many thank for reading this. Sharon King.

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Legend:

    An expert who has written 200 answers of more than 400 characters.

  • Expert
  • 359 Answers

Sharon King:

Did you get this problem solved? I realize it is quite old, but I am willing to help if it is not solved. If it is, I would be interested to know what happened...

smartsolve

Posted on May 05, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

5 Answers

Access 2007 corrupted database


back up files on external hard drive!! mirror hard drive, will keep corrupted file, it might cause further problems. you have lost some critical files, but you might have isolated a virus . Move on, do a clean install, after reload the backed up files one at a time.

Jan 11, 2015 | Microsoft Office Professional 2007 Full...

2 Answers

How Do I re-build Outlook 2011 for mac Database? Re-cuild utility fails at every attempt?


Even if you manage to rebuild your database, you can't import the data into the windows outlook. Although both versions look the same, they use different database structures. just renaming the data file, only will destroy it, when you try to open it.
just Google for outlook data structure 2010 2011 and read what wikipedia has to say on this.
It will take an expert, to help you with this.

Sep 16, 2014 | Infinite Skills Microsoft Outlook 2011 for...

1 Answer

Entourage will not open it says I must rebuild. How can I reopen my account with-out losing my emails


Launch Microsoft Database Utility. Type Database in Spotlight(Magnifying Glass in upeer right hand of screen) then choose Microsoft Databse utility. CLick main identity then Tick Rebuild Database. You need to quit all Microsoft Office Mac Applciations also before opening Databse utility. After rebuilding, click done and then quit databse utility. Then open Entourage. Hope this helps!

Mar 29, 2011 | Microsoft Entourage For Mac for Mac

1 Answer

Anti-spyware does not clear after loading updates. Error loading exclusion databse


If you want to get rid of spy-ware, I would suggest downloading Spybot and Ad-Aware. Install these, update them and then scan your PC and remove anything they find. These tend to work much better than software you can purchase. Experts use both of these.

Mar 02, 2011 | Computer Associates Anti-Virus Plus...

1 Answer

Parts of ms word 2007?


The newer versions (latest) of MS Office (Word, Excel, Access, PowerPoint, etc) were designed to interact with one another. You can pull a file from MS Word, and place it in Excel, PowerPoint, etc and Vise Versa.

Please let me know if you need further assistance.

carsandcomps,

Guru, Premium Expert @ Fixya.com

Jul 19, 2010 | Microsoft Office Excel 2007

1 Answer

MS access hangs when opening a databse?


You need to reinstall, as it is corrupted, this is a classic sign of a damaged data base.

May 21, 2010 | Microsoft Office Standard for PC

1 Answer

CODES for entering an I.D number using vba


Try the help built into Excel and give yourself time to absorb it; Excel has some of the best help in the business. VBA may be more complex than you need to solve a data entry problem. If you're trying to add data input masks in a database, why don't you try Access (the help for which is admittedly weaker because database programming is among the most complex of all productivity apps)? I learned VBA from 3 books I rented from a good public library over the course of a project that was about a month long, (because) at some point Microsoft abandoned the idea of teaching it via help screens. Still, you might join a MS developer site and those are loaded with detailed explanations and many other experts. I hope this helps... I feel your pain.

Mar 22, 2009 | Microsoft Office Excel 2003 for PC

1 Answer

Tabs/sub-form in access 2007 form will not scroll down?


open the form in design view open the properties dialog box by right clicking in the general form area not in the gray area of the detail section. In the properties click on the format tab. In the format tab goto the default view and select continuous form. This should create a virtical scroll bar once a record in the data base.

Dec 30, 2008 | Microsoft Office Professional 2007 Full...

1 Answer

Validation using Excel VBA code


Thats a lot of form work to be expecting out of Excel. You might be better off using Access, creating a table. If you need to export it back to a spreadsheet you can. The validation controls are better in Access and don't have a lot of limitations to them.

Good luck on that

Jul 21, 2008 | Microsoft Office Professional 2007 Full...

2 Answers

Ms access


before this u should know what is databse.
ms access has various objects likw table,form,query,report etc..
table is a object which stores the actual data and form is used to enter the data in to the table and display the data from the table, while report is object which is used to desplay your data in required formate.Query is used to fetch the data from the table in customised formate.for that u should have knowledge of SQL.

Nov 14, 2007 | Business & Productivity Software

Not finding what you are looking for?
Microsoft Office Access 2003 (077-02871) for PC Logo

269 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18297 Answers

Sudeep Chatterjee
Sudeep Chatterjee

Level 3 Expert

3267 Answers

Are you a Microsoft Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...