I am new with ms Access. I am using 2013 version and stuck with "pretty" easy task.
When I create the form, the values are inserted/updated constatly as I leave the input components. However I would like to insert/update the record only when I click the button. How to do that?
Every Page has its on data source based on query, and they aren't related to Parent form or to each other. I want to set few buttons on every Page which would filter records in predefined way.Ex: one page has calculated field named [Za platiti]. It has numeric values form 0 up. I want to set one button to filter only records where field [Za platiti] is greater then 0, and other butt to filter only records where [Za platiti] is = 0. Other filters based on combo box I use regularly.
I have a program that has a "GC" Button that I click on which takes me to a General Contractor Form. It works perfectly unless the Firm has an apostrophe in it's name. For example "D'Agostino". (refer to attached DAgostino1.jpg). When I click on the GC button, I get the attached Syntax error, (Syntax on DAgostiono.jpg).
The third attachment (GC Firm Button Code.jpg) shows the VBC for this button.
I am working on a web database with a form which is bound to an underlying web table where the submissions occur.My challenge is that the fields on the form get submitted to the table even before the submit button is clicked regardless of whether the form was completely filled.
My request is that I want the form to only submit to the submission table only when the submit button is clicked.When I searched on the net, the only solutions I got are VBA written code but my web database cannot use VBA code.
VBA code:
Option Compare Database Option Explicit Private blnGood As Boolean Private Sub cmdSave_Click() blnGood = True Call DoCmd.RunCommand(acCmdSaveRecord) blnGood = False End Sub
I have a Mainform [FrmReconcileMain] and it contains a Subform [FrmReconcilesub]
What I'm trying to is, on the Main form type in a statement date in textbox [TxtStatementDate].
I have a checkbox on my subform [ReconciledYN], along with a textbox [TxtReconcileDateSub]. when I click the checkbox, it simply pulls the date from the mainform and populates the date in the subform.
I've even tried experimenting on a simple form (with no subform) to see whats going on, but still I can't get it to work, even on a simple event such as this...
If [yourcheckboxname] = -1 Then [controlnametoupdate] = date() Else [controlnametoupdate] = ""
Hi all, Not sure if this is in the right section but heres my question.
How can i gett a button to open a word document and put in specific information. for example. to send a client a letter, the button would open a word doc with the specfic client data in it.
Also a button to start a mail merge with all client records held on the db.
Well the title says it all. I need to create a button to lock the info on the form so it can't be edited and at the same time insert the date. Any ideas?
I have form with these info : customer (Table), EnterDate (Button) and customersub (subform), i want to enter date into Date column using form with button.
example
ID name sample date 1. John A .... 2. Michel B .... 3. Jack C .....
into like this
ID name sample date 1. John A 2/2/2014 2. Michel B 2/2/2014 3. Jack C 2/2/2014
I try this this sql. but the date only insert/update for avery row i was select.
Q: How i can make sure i put one date.. it will insert for every row just one click.
Private Sub EnterDate_Click() CurrentDb.Execute "UPDATE Customer " & _ "SET Date='" & Me.insertdate & "'" & _ "WHERE ID= " & Me.Costumersub.Form.Recordset.Fields("ID") End Sub
Question: I have a make-table query which is runned when clicking on a button in a form. Of course after clicking the button the following notifications appear:
1) You are about to run a make-table query that will modify the data in your table (yes, no help) 2) (if the table exists) The Existing Table <<tablename>> will be delted before you run the query (yes, no) 3) your are about to paste 1 row(s) into a new table (yes, no)
How can i make it possible that on forehand all three questions are "yes", so that the user does not see these questions, but the table is filled with the relevant information and can be used?
I have a startup splash screen with a "OK" button, similar to Nortwind database. The OK button works as far as opening my switchboard page. But how do I get the Splash screen to close after I click the OK button? So I can see my switchboard page.
I use a Frm1 which updates my Tbl1. By clicking on this Bt1 of the Frm1 the record is duplicated on purpose having enabled and disabled fields. While Frm1 shows the duplicated record (so it is open) I can change it and save it as needed. However the Frm1 loads having an enabled Cbo1 which normally allows the regular user to pick any value A,B,C or D.
What I would like to have is a line code under the Bt1 click event able to set the value "D" on the duplicated record only. I can not write it under the load form event because I need value "D" set on the combo only when I click the Bt1. Regular user still should be able to select between A,B,C or D when he loads the Frm1 to input a new record.
I tried Me.cbo1="D", also tried Me.cbo1.column(1)="D" under the Bt1 click event and both of them failed. What have I done wrong? How can I get it done?
hey all, I am trying to load a print wizard after clicking on a command button. I am trying to use my filtered data to select specific fields to print. On the fly kind of report. I need to have the ability to use my filtered data to create a specific report. Any ideas?? Thanks
I have a combo box Customer_Name on Order Form; and I want it open the Customer Form when an user insert a new customer to input all data. This seems simple at first, but problems are these:
1- whenever an user opens Customer Form on a new customer, the user would have to make the input once again (at least retype the customer's name on the field).
2- since the Customer_Name and other fields are required in the table, the Order_form would not allow the user to close it unless all field are filled properly.
Dilemma is you have to fill in the Customer_Name field before the table refresh all records and display it in the combo box on Order Form
Hi all, I have a query to recall all the events related to a certain employee by running a query and inserting the staff number, I then have a form showing the details of all employees; what I need is to add a button on the form that runs the mentioned query without having to insert the staff number again as the form is already showing that employee. Thanks Marco
This forum has been so useful to me so far... but having searched through a load of topics for a few hours now I just cannot find a correct method of having the ability to update two tables from a form.
I firstly created a query that selected the nessary fields I wish to update from the two tables.
And its apparent that I need to use RecordSet to insert the information from the form into the query.
I have found a few different ways of doing this - none of which work for me :( HELP!
Method 1 Private Sub Save_Record_Click() 'Save all entered information to tblprocess request and tblBackupRequest
Dim db As DAO.Database Dim rs As DAO.Recordset
messageusr = MsgBox("Save this infomation?", vbYesNo + vbExclamation, "Warning you are about to Save this information") If messageusr = vbYes Then
Set db = CurrentDb() Set rs = db.OpenRecordset("SELECT .Server, [Backup Request].Location, [Backup Request].BackupType, [Process General].Type, [Backup Request].[Size(GB)], [Process General].Group, [Process General].[Date required by], [Process General].[Requested by], [Process General].[Date/Time of request], [Process General].Notes FROM [Process General] INNER JOIN [Backup Request] ON [Process General].ProcessID = [Backup Request].ProcessID;")
'Clear fields on form to indicate write has occurred txtserver = "" cmblocation = "" cmbtype = "" cmbsize = "" cmbassign = "" txtrequiredby = "" txtrequestedby = "" txtrequest = "" txtnotes = ""
'Close recordset and database saverecord.Close db.Close MsgBox "This information has been succesfully saved" End 'return user back to form End If
End Sub
and I have even looked into an insert sql statement [B]Method 3 Dim SQL_Text As String SQL_Text = "INSERT INTO Backup Request (Server, Location, Type , Size(GB)) VALUES ('#Backup Request.txtserver#','#Backup Request.txtserver#','#Backup Request.txtserver#','#Backup Request.txtserver#') &" INSERT INTO Process General (Group, Date required by, Requested by, Date/Time of request, General_Type, Notes;" Docmd.RunSQL (SQL_Text, false)
Method 1 seems to be popular but its returning the message Run time error '3061' Too few parameters. Expected 3. :confused:
I have a form with a subform. I want to use the main form to insert new data and the subform to show all records that are there. One could say that the after inserting a new record with the fields in the form and save it, it should appear in the subform datasheet view.
I'm on my way on creating a simple Database for a company. This database contains several tables, one of the tables will record information about the training that had been completed by each employee. There are about ten sections of training that should be completed.
For instance, I have two tables called 'Development' and 'CSA_Lisence'. 'Development' is the table that record the information about training which containing ten checkboxes (which represent ten sections of training) and CSA_Lisence will be automatically requeried when all of the checkboxes on Development are fully checked.
Here's the step I've been worked on :
First, I made a function called 'CheckCompletion' to ensure whether all the checkboxes are checked :
Code: Public Function CheckCompletion() As Boolean Dim blnComplete As Boolean Dim strCompletionSummary As String strCompletionSummary = Basic_Inspection & Certifying_Staff & Safety_Management_System & Regulation_Part_145 & Part_M & EWIS & Fuel_Tank_Safety_Level_2 & Dangerous_Goods & Human_Factor & Basic_Supervisory_Training
[Code] ....
Second, I made a function called 'UpdateEmployee' to handles if all boxes are checked :
Code: Public Function UpdateEmployee() Dim emp_numb As Long Dim emp_name As Long Dim strsql As String emp_numb = [Forms]![development].[employee_number].Value
[Code] ....
Then, I put this code on every checkbox's after update event (example only) :
Code: Private Sub Basic_Inspection_AfterUpdate() Call UpdateEmployee End Sub
The problem is, nothing happened with the tables. However, when I managed to remove the 'If checkCompletion' condition, it worked and the 'CSA_Lisence' is requeried, but I will have ten multiple records with same contents (I just need one record per employee). I guess there's something wrong or missed in my code. Or i need to remove something?
I am new to access and all of this and trying to create a database to record livestock (budgerigars) I have put in the reletive informnation for 2 generations but would like to beable to click on a record in forms view and for the grandparents to be automatically inserted. Something like a family tree.
Also I would like to be able to double click on a entry which shows as a parent in a form view, and for the database to go directly to that entry and bring it up onto the form.
I hope someone can help and that I'm making so sense
(anyone know a good book that would help me understand all of this)