I am trying to create a button to delete record, I have used the wizard and it works fine but now I want to have a confiirmation message to confirm that they really want to delete this record.
below is my code. The prompt works but the record never deletes.
Any Idea's
Private Sub cmdDeleteRec_Click() On Error GoTo Err_cmdDeleteRec_Click
DoCmd.SetWarnings False If MsgBox("Are you sure you want to delete this record?", vbYesNo, "Warning.........") = vbYes Then Me!frm_Entry.SetFocus DoCmd.RunCommand acCmdDeleteRecord DoCmd.SetWarnings True Else DoCmd.SetWarnings True End If
My form forces the user to send an email to me when using the database for the first time.
I now have a registration number on the form that is hardcoded into each copy by me. It is held in (frmRegister.RegistrationNumber). I already have code to get the email to send but now ned to add the contents of this field to the email.
Code: .HTMLBody = "<HTMLtags>This email confirms that a new user " & _ olApp.Application.Session.Accounts.Item(1).SmtpAddress & _ " has registered a copy of Gundog Manager.
The registration number of this copy is (frmRegister.RegistrationNumber)</HTMLtags>"
Is there any way to customize append query confirmation message? Unclicking Confirm Tools-->Options-->Edit/Find-->Confirm-Action Queries disables all warning messages.
My query takes some records from one table and append them to another table. When I run the query, first warning message says "Warning you r about to run an append query that will modify data in your table" (this is the message I do not want to see) and then if OK is clicked, the message says "you are about to append XXX rows...(this is the message I would like to customize)
I am building a simple db from scratch using the limited knowledge i have, and a lot of the information gained from searching these forums as a guest. I've now reached a point where I can't seem to find what I'm looking for, so any help would be gratefully received!!
I have a single table, single form and single report (told you it was simple;)). The table has nearly 2000 records and 2000 pictures (linked). On the form I can print every record with a single click of a command button. This is great, but I would like a message box to popup and confirm the print action, as this is gonna be expensive if its clicked on every record!!
If anybody can help, I would be chuffed!! I searched the forums and can't seem to find anything on this!!
I am designing a transactions database for some of my clerical staff. I've inserted a data entry subform into the main transactions form (which also has a subform that summarizes all the selected company's past transactions). This data entry subform actually has as it's record source a table that simply stores that one record temporarily.
So when the user is finished entering their current transaction, I have a Save button that actually just opens a popup form which displays the data they entered into the data entry subform, giving them a chance to verify their entry is accurate. This form has a Save button which runs an append query and a delete query, adding the record to the permanent Transacations table and also clearing the temp table.
The problem I have, I think, is that when the popup form opens, the main form data entry subform still has that record locked as exclusive. I believe this is the case because while I am indeed able to make changes to the fields on the popup form, none of these changes appear in the temp table. In other words, the user is not actually able to use the confirmation pop up form to make any necessary edits to their entry. This makes the form sort of useless!
I have a 2003 mdb which I have opened in 2010 from my C drive. If I hover my mouse over a table name it shows the original UNC path. How do I change this so I can view the data without an error message appearing?
I have a report that generates 100 items in alphabetical order. All of the items are also displayed in a table. I have a bound form attached to the that table, and when the items appear they are not in alphabetical order. Therefore, it is a hassle typing in the data when the form will not appear in order, because instead of going in order I am flipping through pages. What is causing this to happen? And what can I do to fix this?
When a query returns no records, the form appears blank. How can I make the form appear eventhough there are no records to show prior to inputting data.
My training table consist of 3 fields and using unbound form
1st field custid (text field)
This can't be NIL or Can't duplicate
What I am looking for learning point of view (duel check at same field with different behaviour).If record is duplicate "Popup message" and curser move back to same field.If field is empty "popup message" Do you want to continue, If yes, move back to field if NO, close form..Therefore, on Before Update event I wrote the following.
Private sub txtcid_beforeupdate (cancel as Integer) If Dcount("[custid]", "[customerdetails]", "[custid]='" & me.txtcid & "'") > 0 Then MsgBox "Customer ID already Exists !!!!" Cancel = True Me.Txtcid.Undo
[code]....
Just a quick update "I tried to used YES or NO option in Exit event too, but no success.
I have a form and I have created an event procedure on the "before update" property of the form. My procedure is:
Private Sub Form_BeforeUpdate(Cancel As Integer) Dim pwd As String pwd = InputBox("Is the information you entered correct?") If pwd <> "yes" Then MsgBox "Record Not Saved" Me.Undo Else MsgBox "Record Saved" End If End Sub
the record is not saving under any situation. What do I have wrong?
So I have a Form (frmPositions) with a subform attached (fsubPosSkill).They are linked through Position ID frmPositions Record Source is qryPositionNeeds
Code: SELECT tblPositionNeeds.PositionNeedsID, tblPositionNeeds.PositionID, tblPositions.Position, tblPositionNeeds.NeedsID, tblNeeds.NeedStatus FROM tblPositions INNER JOIN (tblNeeds INNER JOIN tblPositionNeeds ON tblNeeds.NeedID = tblPositionNeeds.NeedsID) ON tblPositions.PositionID = tblPositionNeeds.PositionID;
It has two texts boxes on it [PositionID] and [NeedID]
I want to display a message on a label superimposed on top of all objects if certain conditions are met when selecting a record in a listbox. The label is normally invisible and only made visible when the condition is met. The label stays visinble for 2 seconds using the timer event.
All that I cannot do is display the label on top of the listbox, it always sits under it.
I made a blank form, created everything on my form then added a header to put the title etc in and tried to view it using form view and the header isn't appearing. What do I need to change?
I'm looking for some basic ideas on how to change the registration proceedure for my company's conference from a basically all paper endeavor to an online form.
Would it be relatively simple to put a form on our website asking for basic information (Name, Company, etc) that would output into an MS Access file? Are there technical issues / problems that would make this very difficult?
I have drop down list linked to table included "agent names" , the names appeared normally in the form but not Alphabetic (A-Z) although the table was alphabetic .
I am having a problem updating a record on a table called BookInTable . The field I want to update is called Engineer and the record is found using the field Barcode. I have a form with 2 text boxes BarTxt and EngTxt as well as a button called SaveBtn. on the OnClick event of the SaveBtn I put the following code
Code:
Private Sub SaveBtn_Click() If IsNull(Me![BarTxt]) Or (Me![BarTxt]) = "" Then MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!" Me![BarTxt].SetFocus Exit Sub End If
DoCmd.RunSQL "Update BookInTable SET Engineer = " & Me!EngTxt & " WHERE BarCode ='" & Me![BarTxt] & "'"
End Sub
But this is bringing up the enter Parameter value dialog box for whatever I type into EngTxt. If I enter text into that box and then click okay it then updates to the record. how can I stop the from enter Parameter value dialog box appearing?
Hello im new to this forum and I just recently became involved with access so please bear with me and my many questions. I work for a mining company in Canada and we have training events. These records must be kept showing who attended and what was covered.
I have used the event template and contact template and merged them into one to I have a listing of all employees and their personal information. I have another table with events that say what was taught or shown and so forth. I am trying to figure out the best way to have them register for these events.
Right now I have right now a registration form that has the employeeID and the eventID. The problem is I would like to be able to use a list view and just select the people who attended and with the press of a button have all the registrations be completed dynamically. As right now for each person I have to create a new entry. Hope I was not too confusing, and thanks for the time. Patrick
I’m adding a new function to our Costumer Relations Management system – Time management. Or maybe “time registration” is a better definition for it. The idea is that our consultants can add their hours into our CRM, either from the “Project”, “Tasks” or “Costumer” part of the CRM. Note: This is a tool to keep track of hours spent on a project, not a planning tool.
I’ve made the input-form for the records (Date, ClockStart, ClockStop, TimeSpent, InvoiceHours, etc.). But now I’m basically without a clue on where to start – I want to make a function almost like the calendar in Outlook, where the consultants can input what they’ve been working on, say between 13:00 and 14:00.
It doesn’t have to be fancy graphically, but functional and give a good overview.
when i want to open the database in an access database i have the following error. you have as the event property setting the expression entered when open.This expression has caused an error amppu (database name) can not find the form that is referred to
I have created a profiling form for my school. Each boy can access his form using his admission number ( Adno) which is the primary key. On the form are lots of sub forms - for things like favourite authors, clubs, teams played in etc - but these don't have a primary key ( as they are automatically linked to the Adno via the main form ). Unfortunately when several boys are filling in their own forms at the same time I keep getting error messages, one says that the data can't be updated and another says that there is a primary key problem.
I have some code (see below) that checks if the start date text box is blank or greater than the end date, and if so, generates a message box and sets the focus back to the start date textbox. There are command buttons on the form that open queries based on the date fields. This all works fine.
However, if the user changes his mind and closes the form without filling in the date field, the message box "Please enter a start date" pops up repeatedly. How do I specify that a text box is required UNLESS the user is closing the form?
Code: Private Sub txt_startdate_LostFocus() If ((IsNull(txt_startdate) Or (txt_startdate) = " ")) Then MsgBox "Please enter a start date.", vbOKOnly
is there any way to get rid of deletion confirmation when you run a make-table query. though I unchecked all boxes under Confirm on Edit/Find tab, still popping up.
I'm wondering if its possible to have a "would you like to save changes, yes/no" thing pop up after data has been added or changed to a form, or have the option to save when closing a form and if no is chosen then any data changed is not saved.
When i try to insert data into a backend Oracle table (with ODBC) using a form, (i use docmd.runsql "insert....") Access gives me a message like"You are trying to append 1 row to the table are you sure you want to append?"
i want to suppress this message as i have to insert into 2 tables and delete from 3 tables when the user enters some data in the form, so it asks the user five times (say 2 times for insert and 3 times for delete..) when it inserts or deletes each table. the user doesnt want this to click every time when they do that... how do i suppress these messages, is it Access-specific or oracle specific? I am not able to do this..! is this any kind of exception that i have to put in??
I have a database that logs complaints. I've added a field to calculate the age of a complaint based on the date received and the date resloved. To update this field I have an update query that runs after someone closes an update form. My problem is that I recieve two dialog boxes one that confirms that I'm will be updating the table and another that tells me how many rows were updated. I would not like those boxes to appear so the update would look transparent.