Good Evening,
I wonder if anyone could help me please.........
I have found Ghudsons attached ‘Browsing2’ example to be of enormous
benefit/use to me when I have been creating various Databases, however I was wondering whether Ghudson or any other kind person(s) would either show or point me in the right direction as to how to create a ‘Delete’ facility which is very similar to the ‘Open’ command button on the continuous form.
I have attempted to adapt the enclosed 'coding' to see if it will come up with the result that I want, but unfortunately I cannot!
Attachment kind courtesy of Ghudson
http://www.access-programmers.co.uk/forums/showthread.php?t=97787&highlight=browsing
Your help or assistance in this matter would be very welcome...........
All I am trying to do is insert to have a form with a "Delete Record" button on it. The problem is I don't want anyone to be able to delete a record, I would like someone to have to insert a password to confirm the delete.
There is a continuous form with a check box in each row and a command button(cmdDetails) in the form footer section. You select a record and press cmdDetails and another form opens.
Rather than in the footer, I would like to have the command button placed in the details section itself, in each row, against each record, so that the check box can be eliminated. Pressing any button will open the corresponding form. how I can "associate" each record with the button next to it.
I have two command buttons in a subform "sbfScoutRegDetails", one that launches a report and the other attaches the report pdf to an email, associated with the record ID when clicked.
Both of these buttons work fine when just the subform itself is open, but when viewing it in its main form, I get a window saying 'enter parameter value' for "Forms!sbfScoutRegDetails!ID" (this is the WHERE condition in the macro).The report then opens with all the record information blank.The full WHERE condition
Code:
[ID]=[Forms]![sbfScoutRegDetails]![ID]
Not sure if it's because of using a continuous form as a subform? I need the user to be able to view/print or email a contract to each group/contact that signs up.
I have a continuous form in which I put a command button for each record called "detail". I would like to click on the "detail" button and make it open another form containing all (and only) the info on this record.
At first I refused to use an "id" to link both forms, but finally I added the "id" in the table... however still does not work.
continuous form: "04 - GASTOS_BUSQUEDA" id field on continuous form: "Gastid"
pop-up (details) form: "GASTOS_EDITAR" id on pop-up (details) form: "editar_id"
This is what I have tried on the "click" properties of the "details" button field (called "btn_editgs"):
4) Private Sub btn_editgs_Click() On Error GoTo btn_editgs_Click_Err Dim strWhere As String strWhere = "[editar_id] = " & Me.Gastid DoCmd.OpenForm "GASTOS_EDITAR", , , strWhere btn_editgs_Click_Exit: Exit Sub btn_editgs_Click_Err: MsgBox Error$ Resume btn_editgs_Click_Exit End Sub
I have a delete query in my database which I would like to run from a command button on a switchboard. When I use the command button wizard, it does not show delete queries in the menu of available queries. If I create a command button manually I will need VBA code for the event procedure.
Can someone give me an appropriate code for running a delete query with a command button?
Private Sub DeleteRecords_Click() Dim db As Database Set db = CurrentDb db.Execute "Delete * FROM tblJune 2005 applicants;" End Sub
I am trying to delete all records from a dabase created in access. When I click the command button, I get this message: "User-defined type not defined"
I'm having problems making a command button(Ta bort från engelska till svenska) of a delete query. The name of the query is"Ta bort från engelska till svenska", which is also the name of the button on the form(huvudformulär)
Could someone please help me. I'll enclose my zipped database.
I have created a form where data is entered. I wish to place a command button on the form and when it is pressed, it deletes data in specified textboxes. The texboxes are: LAST_NAME, FIRST_NAME, MIDDLE_NAME.
I assume this is done using vb, but I am clueless.
I have created a form and need to be able to delete employees from a table. I built a command button using the wizard and this is the current vb code-
Code: Private Sub cmdDeleteEmployee_Click() On Error GoTo Err_cmdDeleteEmployee_Click
DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdDeleteRecord Exit_cmdDeleteEmployee_Click: Exit Sub Err_cmdDeleteEmployee_Click: MsgBox Err.Description Resume Exit_cmdDeleteEmployee_Click End Sub
But when I click on the button I get a message saying it would create duplicate data in the table.
I am trying to create a command button that will delete the current records in both the subform and main form.
I know how to create a command button that will delete the current record of which ever form I'm in (either the sub or main form) but I wish to do so both at the same time with one event procedure. I currently have been experimenting with a button in the subform but I don't really care if it's in the subform or main form.
I need to have a button on my continuous form that deletes the corresponding record... I used the wizard to create the button, but it doesn't seem to work...
I have a continuous form with a button(delete). on click event I want to delete a record on another table. I though about doing this via a delete query. The sql is below:
I have a continuous form reflecting events. The notes field is too large and so has to be it's own form. I made a button that is supposed to open the notes for the record. But it doesn't matter which record I'm on, it clicking the button always brings up the same note - it doesn't link the criteria and open only the correct record in the notes form. Is this because it's a continuos form? How can I fix this?
I have a continuous form with button for every record, wich has a VBA code. I want to put Button in header form, when i click it, then should run all button in continuous form. How can I do that.
I was wondering if any of you experts out there know a way to help me out here. I was wondering if it is possible to color the text on the last pressed button on a continuous form different from all the others, so people will know which one they pressed last? I've been trying a lot of different things here but i'm stuck. All i can get done is that all the buttons turn a different color, but doesn't solve anything.
I am trying to make a simple form to tally my total products ordered.
So I wanna add a plus and minus button on my continguous form, but i cant get it to work. How do i update the current record when clicking on the button next to the field ..? It seems only the first record gets updated ..
I am creating a program to allows us to figure out where our personnel are. I am using a continuous Form that shows the individuals name, phone numbers etc. and infront of that is a checkbox, and a combobox that shows "Leave", "TDY", "Contacted" etc. I also have two fields that fill up with what time they were contacted or when they reported in. The default status is "Not Attempted and the checkbox is not checked, and the time fields are blank.
I attempted to use this code:
Dim ctl As Control For Each ctl In Me.Controls Select Case ctl.ControlType Case acCheckBox ctl.Value = False Case acComboBox ctl.Value = "Not Attempted" End Select Next ctl
but it will only clear the one line (it doesn't clear the times yet, i figure i'd add that once I figure out to clear one). This seems to work if this was a single form, but not for continuous. How can I convert this for continuous forms?
I have a continuous form with a button 'Cmd1' & a textbox 'txtMail' which is set to visible no.
When the user clicks Cmd1 - then txtMail becomes visible.
I can do it using vba on the buttons click event but when it executes txtMail for all the records become visible.
How do I use a button's click event on the form's current record - Private Sub Form_Current() so that when the user clicks Cmd1 on the current record only txtMail for that record becomes visible.
So I have a continuous form and I have a button that is pressed when a job is released and it record a date in a field. I wanted to turn that button to disabled after pressed but after lots of reading found that it couldn't be done in a continuous form due to it disabling all buttons . So I decided to just make the code populate the field only if it was a null value so that it wouldn't overwrite a value if someone pressed it more than once. Well the null is my downfall in all this. I cannot make it compare and populate the date when the button is pressed. I have tried all I can find on the net and all I can think of.
I have continuous form in Access 2010. I highlight selected record. Now I would like when user will select record, that record will display button to give ability user delete it. For not selected records button not visible and disable. How to display button only in selected record in continuous form?
I currently have a button that holds a delete command. When the button is clicked, a MsgBox pops up and ensures that you want to delete (yes and no); Yes deletes, No cancels.
Now I need to change it around a bit so that it is more secure. I would like add an 'authorization' code (password). When the msgbox appears, I would like it to have a text box where the user needs to enter in the password, if the password is correct then it would delete, if wrong then cancel.
I need help. I finish my contract tomorrow and this is all I have left
I created a form that lets the user choose specific criteria, through a combo box, to run a report that houses several subreports. Each combo box is referencing 4 queries needed to run the report.
=[Acctmgr_renewed_detail]![RenewalMonth] And [Acctmgr_begbal_2005]![RenewalMonth] And [Acctmgr_cancelled_sum]![RenewalMonth] And [Acctmgr_renewed_sum]![RenewalMonth]
The form also includes a command button to preview the report. However, when I click the command button, the prompts for parameter values for the report popup again, when it should just print the report. Below is the code attached to my command button:
Private Sub Command2_Click() Me.Visible = False DoCmd.OpenReport "Acctmgr_monthly_activity", acViewPreview DoCmd.Close acForm, "valarie" End Sub
Is there something I need to add to my code? If so, what? Any help would be much appreciated.
Hi everyone, I am trying to create a button on a form that will export only that record. On the command options I do not see there being an option to do such. Can anyone help? Thanks