Password on a command button?


i have a slight problem that i could really do with some help on.
I have a form in which u can edit/add or delete details of a record. What i would like to do is when someone presse's the delete button i would like a box to pop up asking for a password to be entered before the record is deleted just to prevent certain records from being deleted.

Posted On: Monday 22nd of October 2012 05:57:30 AM Total Views:  289
View Complete with Replies

RELATED TOPICS OF Microsoft Access PROGRAMMING LANGUAGE




Using a password to protect forms

Hi I have created a database with a form that is protected by a password, but in order for the password to be set the user needs to convert the string into keycode. For example, during testing the password used is PASSWORD with the code 2818. It would obviously be better for the user to be able to change this password without having to know the code. To make the password I orginally followed another tutorial so am a little out of my comfort zone. THanks pb
VIEWS ON THIS POST

200

Posted on:

Wednesday 17th October 2012
View Replies!

Subform - command button visibility

Wonder if you can help. The scenario I have is that I have a form with customer details in and a subform below that with all their quotations in. In the subform with multiple records (continuous forms) I have a combo box with 5 choices in. What I'm after is when "CM" is selected from the combo box, I want the command button.visible = true, else if anything else is selected it shouldn't be visible That part is ok, it works to a degree but what happens is, when I change the combo box selection in the first record in the subform, it applies the same theory to all the other records despite if CM is selected or not . Hope this makes sense. This is my code: On change: (I've tried on update too.) If Me.combobox = "CM" Then Me.Commandbutton.Visible = True Else Me.commandbutton.Visible = False End If
VIEWS ON THIS POST

181

Posted on:

Wednesday 17th October 2012
View Replies!

Ho to Save password while connecting Database from MS access & how to shedule queries

Hi , Can someone pls help me.. I have a mdb file with some 110 queries in it and a made a ODBC connection to connect to my database and daily at 10:00 pm i ave to run all these queries and sent to higher level. So my problems are... 1) Each time when i click on query it will ask password and every time i ahve to enter a password and hit enter once output comes i have save the output into excel and we have privillage(mean a button) in excel to "Analyze with excel " so all this process takes 2 hrs for me and i know iam wasting my time... 2) Second problem as iam runing this reports daily basis exactly i have to start running this reports at 10:00 PM. So is there any way to shedule this reports so that they can run at 10 daily and save these reports in certain location in excel format. If you have any suggestions pls let me know.. if you want any detail information pls let me know....
VIEWS ON THIS POST

188

Posted on:

Wednesday 17th October 2012
View Replies!

Adding VB code to a command button on a form

all, I have a data entry form in my Access 2003 database. The user can utilize a calendar to put the date into the date field on the form. I have a command button on the form that brings up a new record. It is very likely that several records will be entered for the same date. Right now the user needs to select the date every time. I would like to modify my "new record" command button so that when clicked it copies the date in the current record then opens a new record (as it currently does) and pastes the date into the date field. I am sure there is simple code for this that I can add to the code created by the wizard when I made my button but I don't know VB code, unfortunately. Any help on this matter will be greatly appreciated. It is soooo tedious to have to enter the same date for a ton of records! Thank you, Lisel
VIEWS ON THIS POST

155

Posted on:

Wednesday 17th October 2012
View Replies!

I am trying to create command button that will write something on its subform

. thanks you for help in advance. I am creating database for inventory management especially for laptop. I have a form that has all the laptop data and it has its subform which is for tracking its history. I am trying to create a check out button that can ask users for the name then if the name is entered it writes on the subform whatever the name is. It also automatically writes checkout date on the subform as well. Can I get some assistance since I am struggling where to begin and which codes will be useful
VIEWS ON THIS POST

216

Posted on:

Wednesday 17th October 2012
View Replies!

How to create accounts with username and password in MS Access

I tried creating new accounts in MS Access 2003 thru Tools>Security>User and Group Accounts. I can log in successfully in the database with my username and password in MY COMPUTER. But if I send it thru an email to a person in other countries. The data doesnt ask for a username and a password anymore. They can access the database without username and password.
VIEWS ON THIS POST

196

Posted on:

Thursday 18th October 2012
View Replies!

Running a batch file from command prompt using VBA

I know this can be done but I'm a novice at VBA. I have a batch file AutoLoop.bat which I run from command prompt at the moment. The idea is to run a VBA routine behind the onClick event of a command button in Access which would run this batch file in command prompt automatically. Say if the batch file path is I:\AUTOGEN\LOOPGEN\AutoLoop.bat, what VBA code can be used.
VIEWS ON THIS POST

130

Posted on:

Thursday 18th October 2012
View Replies!

ACCDB password

hello, is it possible to programmatically set or change the password to an accdb file from within an application (my app is written in VB 6) i know this was possible in the old mdb format but what are the options for the new format i must use the accdb format for security reasons.
VIEWS ON THIS POST

112

Posted on:

Thursday 18th October 2012
View Replies!

Need help with the "IF" command Please

I have a table called "tblTasks" In this table I have two fields: "Status" and "PaymentDate" My aim is to acheive the following: If the field for payment date is left empty then the status will read "OPEN", but if there is a date entered then status will read "CLOSED". The data is displayed on a subform within a form in datasheet view. In the edit mode I have entered an unbound text box but I dont know what IF command to write. I am sure this is a simple "IF" command but I cant get my head around it. Can someone please assist Thank you.
VIEWS ON THIS POST

104

Posted on:

Thursday 18th October 2012
View Replies!

Problem in MS access 2000/Windows XP: SQL commands via ODBC,ADO

I have MS ACCESS2000/Windows XP, I am using ODBC connection and even ADO to get information from a table in a Access Database, from Visual Fox Pro or Java: When I try to run the following command: Select * from Mytable gives me an error, no matter what the table is (MyTable is just an example), the error says that OBJECT (the name of the last field) does not exist. Then if I go to MS access and try to open that table, I got the message: CIRCULAR REFERENCE CAUSED BY ALIAS EXPR1000 IN QUERY DEFINITION'S SELECT LIST. I did not get this problem when I try in another computer with WINDOWS 2000. What is the problem, how can I success with SQL commands
VIEWS ON THIS POST

162

Posted on:

Thursday 18th October 2012
View Replies!

help with custom command button

I want to create a custom command button that when clicked hides elements (such as a box, a label, etc) on a specific form (the switchboard) and shows another element (a sub form) I guessing I would create a module check if the active form is the form called switchboard then using the .Visible properties of each element I want to hide set it to false, and the opposite for the sub form. Questions I have 1- how do I check if the active form is the form called switchboard - and if not how can I switch focus to the form called switchboard 2- working with modules can i simply call each element like the following Me.CategorySubcategory.Visible = False 3- now how do i have the code in the module execute when the person clicks the custom command button (i guess it has to do with the on action event in the property for the custom command button but not sure what)
VIEWS ON THIS POST

215

Posted on:

Thursday 18th October 2012
View Replies!

Refreshing linked tables on a password protected back end?

I'm using Access 2000. My database is split between the front end and the back end. When the front end is loaded the file location of the back end is checked. If the back end doesn't exist, a form is loaded which allows the user to enter a new file location. This all works fine, however as the back end has a password on it, when the link tries to refresh, for each table I get an invalid password error message. How can I get past this error Can I specifiy the password in my code If so, how do I pass this into the back end db before the tables are refreshed Here is my code: Code: Dim dbs As Database Dim tdf As TableDef ' Loop through all tables in the database. Set dbs = CurrentDb For Each tdf In dbs.TableDefs ' If the table has a connect string, it's a linked table. If Len(tdf.Connect) > 0 Then tdf.Connect = ";DATABASE=" & FilePath & "\" & FileName & ".mdb" Err = 0 On Error Resume Next tdf.RefreshLink ' Relink the table. If Err 0 Then MsgBox Err.Description End If End If Next tdf As always,
VIEWS ON THIS POST

154

Posted on:

Monday 22nd October 2012
View Replies!

How do I print to PDF from command line?

! I'm trying to print a pivot chart to PDF from the command line. The main problem I'm having is that any print switches on the command line print out the query but not the pivot chart view of it. It's just the basic view that opens up by default when you select the query. How do I get the chart view to print to PDF
VIEWS ON THIS POST

87

Posted on:

Monday 22nd October 2012
View Replies!

Auto increment button

hi . may i request for your help please i'm currently trying to do a button with a code that has an auto increment funtion. This means when every i press the button the number will gradually increase by 1. currently the code below is what i have but it does not seem to work. anyone willing to help. would really appreciate your help. thanks Option Compare Database Public Function NewCustID() As Long On Error GoTo NextID_Err Dim lngNextID As Long 'Find highest Employee ID in the tblPracticeEmployeeData table and add 1 lngNextID = DMax("[ID]", "Authorised_Listing") + 1 'Assign function the value of the Next ID NewCustID = lngNextID 'Exit function now after successful incrementing or after error message Exit_NewCustID: Exit Function 'If an error occurred, display a message, then go to Exit statement NextID_Err: MsgBox "Error " & Err & ": " & Error(Err) Resume Exit_NewCustID End Function
VIEWS ON THIS POST

80

Posted on:

Monday 22nd October 2012
View Replies!

Editing Table Data from within a Form using a button

Hi I'm trying to set up a form to log my clinical placement, and the number of time i undertake a procedure. I want to have a list of a few procedure(fields) and then button next to each one in a form which will increment the number by one How do i go about doing so
VIEWS ON THIS POST

87

Posted on:

Monday 22nd October 2012
View Replies!

Logic commands: IF function

I have been working on customizing MS ACCESS to produce a report that involves one mathematical computation from my input data. However, I've run into a problem because I can't get the program to carry out a logic command that would work fine in MS Excel: the "IF" command. Specifically, what I'm doing involves a calculation, where one data input is subtracted from another data input, but if the difference is a negative number, I would like to substitute the value of ZERO. The closest I've come to achieving this is to enter the condition ">0" while in Query Design mode, but the problem with this approach is that if the difference is a negative number, the report does not display the data that resulted in the calculation of the negative number. In other words, I want the data to be included in the report, but I want a "Zero" to be substituted for all calculations that produce a negative number. For example, if I enter a set of data, and the two numbers that get subtracted are 40 minus 36, then the difference is positive 4, and so I want a "4" to be displayed; But if the two numbers to be subtracted are 36 minus 40, the result is negative, and so I'd want the report to display a "zero" in the calculation. Please advise me on how to set this up, as the only approach I've found resulted in all negative calculations being omitted from the report.
VIEWS ON THIS POST

64

Posted on:

Monday 22nd October 2012
View Replies!

I need help on command buttons

I want to create a new database which has a startup form that has 4 command buttons.. My problem is that I want that every click of the command buttons will take me to the main switchboard of the other/different database.. How am I going to link those buttons to different databases anyone help me
VIEWS ON THIS POST

80

Posted on:

Monday 22nd October 2012
View Replies!

search form with option buttons

, I have a form named Welcome which I want to use as search menu for my database. I have added 4 option buttons and a unique textbox into which users will write their query criteria. My database has 4 queries and each option button should refer to one of them once selected Obviously I will need a command button that will run the query.
VIEWS ON THIS POST

105

Posted on:

Monday 22nd October 2012
View Replies!

Three dots button

Where is the button with the three dots located in access so when i go to form desing i could add that button to the form for look up.
VIEWS ON THIS POST

97

Posted on:

Monday 22nd October 2012
View Replies!