I have a form that student grades on. I use a listbox to pick the names. I also have a pop up form for me to enter new students that are not in the pop up "query" form. I can go to my form with the grades and hit a refresh button and the listbox is updated. I would like for my data to be requeried and up to date when I close the pop form. Any suggestion.
The following SQL event will not update the CustomerData table if the FrmContact field on the form is left blank. I have this code in the OnLostFocus Event. Is it possible to have this command update the fields that do have data entered in them even though the FrmContact field is blank?
I am fairly new to access but so far I have been able to get what i need from it, until now. I am trying to find a way of comparing two sets of data to find out an employee's average productivty.
Table 1 -Hours Worked (by day) - contains 'name' 'date' and '# of hours' worked - an employee would enter the hours here on a daily basis
Table 2 - Contracts Keyed (by month) - contains the number of contracts worked that is derived from seperate system - this is entered on a monthly basis (so for example: John keyed 30 contracts for the month of January) - the system i am pulling this info from does not have the ability to pull a daily count of contract per employee, only a range of dates and it then provides the sum for that range (unless I ran a query for each day, for each employee which would take me hours) - employees dont have access to this system to enter their own # of contracts keyed on a daily basis. - for entry, so far i have just been putting the first of the month and then the # of contracts.
In a nutshell, this is the calculation I am trying to create:
(Sum of "# of hours" for the month) / (total "# of contracts keyed" for the month) = employees average hourly productivity.
I have tried to do this with various types of queries and reports but with no luck, I get a prompt saying that access can't compare the 2 fields.
Is there a way to compare the data that is entered daily with the data i would enter monthly?
I am wanting to update data in one field which is being pulled in from another table based on an entry in another field in a form
Attached is the database. In the sales form I want to enter a customer ID which will then pull in the customer name from the customer table and put it in the Customer Field in the sales table.
I know I am duplicating the data by having customer name in both tables which is bad database design!
I've got this multiple select listbox which writes data into a textbox:
Private Sub List2_AfterUpdate()
Dim Cursisten As String Dim ctl As Control Dim Itm As Variant
Set ctl = Me.List2
For Each Itm In ctl.ItemsSelected If Len(Cursisten) = 0 Then Cursisten = ctl.ItemData(Itm) Else Cursisten = Cursisten & "," & ctl.ItemData(Itm) End If Next Itm Me.txtCursisten = Cursisten
End Sub
And I've got a SELECT ALL button to select all records in the listbox:
Private Sub cmdSelectAll_Click() On Error GoTo Err_cmdSelectAll_Click
Dim i As Integer
If cmdSelectAll.Caption = "Alles Selecteren" Then For i = 0 To Me.List2.ListCount Me.List2.Selected(i) = True Next i cmdSelectAll.Caption = "Alles De-Selecteren" Else For i = 0 To Me.List2.ListCount Me.List2.Selected(i) = False Next i cmdSelectAll.Caption = "Alles Selecteren"
The only thing is that when I use the SELECT ALL button, the function List2_Afterupdate doesn't work anymore. There must be a simple solution but I just can't figure it out. Can anyone please help me?
Hi, I'm new here, so I hope I'm posting this in the correct place. I've searched the forum to see if there are any existing threads that might help me, but I've not found anything that does... (I think this thread ( http://www.access-programmers.co.uk/forums/showthread.php?t=93444&highlight=Copying+data )may be trying to achieve something similar to me, but I'm a beginner and don't really understand it)
I shall stop waffling! I'm not entirely sure that what I'm trying to achieve is possible, I expect it probably is!
Right, I have a form (frmGroupRegister, which contains exactly the same fields as the table it comes from, tblGroupRegister), which consists of three things:
-GroupDate - The date a group took place on. It is my primary key, as no more than one group occurs on a specific date.
-ParentList (A listbox which contains a query showing the ID number, forename and surname of everyone in a table, tblParentDetails)
-ParentsAttending (A blank listbox)
I would like to place buttons in between the ParentList and ParentsAttending, which would allow users to conduct a 'register' of attendance by copying individual/multiple details from ParentList into ParentsAttending (much like you get when choosing which fields to include in a form when using a wizard for example). I would also like them to be able to remove people from ParentsAttending by using a button in case of accidentally adding the wrong person into the ParentsAttending box.
I'm aware that another, probably simpler way of achieving this would be to use a tick-box system, but I feel that visually, the first method would both look better and demonstrate who is present more clearly.
Any help would be much appreciated, but my Access skills are quite basic and things will probably need to be spelled out for me. I'm using Access 2000 and Windows XP. Thanks for your help, Alice :)
I'm a maintenance coordinator for a small trucking company and I'm putting together an access database to track and manage all of our fleet maintenance. I'm rank amateur when it comes to access but I've been doing ok with it and so far I've been able to get it to do almost everything I set out to have it do.
But I'm having a hard time figuring out how to make this trick work. Here's what I want it to do. We have two groups of trailers, working trailers and storage unit trailers. We do preventative maintenance every six months on road trailers and once a year on storage units. I have a field in tblEquipmentMaster which shows the last PM date. I have a query and an report which use that LastPMDate field as well as the value of a StorageUnit checkbox to calculate what units are due/overdue for PM.
In addition to all this, I've got tables and forms set up to track maintenance records. I'm tracking the maintenance invoices as well as the details of each line item on the invoices (changed water pump, replaced tail light, PM service etc). So what I'd like to have happen is for the LastPMDate field in tblEquipmentMaster to update to the value in InvoiceDate in tblMaintenance anytime the field Description in tblMaintenanceDetails contains the text 'PM' for the unit number in question. Alternatively tblMaintenanceDetails also has a lookup field which contains maintenance codes. So the field VMRSCode could also be used as the trigger anytime the value 'PM' is selected.
I'm trying to update all the rows in a column (column A, PO Number) within a table (iSupplierTable). The value (txtPONbr) is entered by the user on a form (NewPO).
Code: Private Sub cmdSubmit_Click() On Error GoTo cmdSubmit_Click_Error Dim db As Database Dim rst As DAO.Recordset Dim strSQL As String strSQL = "iSupplierTable"
I've got a form with a series of combo boxes which are dependent on each other, however i keep finding that after ive entered some data and left a record, when i then return to the record, some of the information ive entered has been deleted and the combo box is blank.
I think it must be requerying the combo boxes everytime the record opens but i dont know why, i have only put requerys "OnChange" because that is the only time the dependent combo boxes should be requeried.
Once the info is entered and ive moved on to a new record, i need for it to stay that way when i return to the record and only change again when i edit it.
I have a problem in linking the forms. I have a form called FORM1 and i have 2 comboboxes there. Now I have also a listbox in the same form and in this case I need to update the values in connection with the values that are given in the combo boxes. Can anyone say me how the updates are done automatically in the listbox.
I have a field in a database that needs the data entered without any spaces and I'm trying to figure out how to set either the validation rules or the masks so that the system will either automatically delete any spaces or warn the user not to enter them.
My preference would be for them to automatically be deleted.
Any ideas, suggestions?
I can figure out how to make either all numbers or all letters, but the data is both so that doesn't work.
I have a form with several tabs on it, where the user enters various info.. I want to have the user hit the save button and have all info saved to a single table. Is there an easy way to do this. Please excuse my ignorance but I am fairly new to Access. Thanks in advance!
My Edit info form has several fields. The two of interest are: Filestatus - text - open or closed Dateclosed - date format When the file is created, the filestatus field is set to "Open". What I would like to do is when a date is entered into the dateclosed field, automatically change the filestatus to "Closed".
This is my first question posted on this site. I have created a survey with questions to be answered. The database is already populated with records of the people's names who were getting the survey. What I need is when the data entry clerk brings up the customer's name on the form, is that they are forced to enter the surveys answers for certain questions before they click the "Save" button. The answers are set up as radio buttons on the form (ie Less than 6 Months, 6 Months, 8 months and 1 Year).
Not sure if a Before or AfterUpdate macro is needed?
Any suggestions would be appreciated. Please email me directly if you have code.
I have a form where the user can add as many rows as he wants - it's usually only 1 or 2 but that's not the point.When he has finished editing he clicks a Save and Exit button.In here I want to save data from the last row he has entered. I have this working but only if the cursor remains on the last row or on the 'new' record row. If he manages to, say, put his cursor on the penultimate row then I save the data for that.
eg.
Col1.........Col2..........Col3..............Col4 AA...........AAA...........AAAA.............AAAAA BB...........BBB...........BBBB.............BBBBB CC...........CCC...........CCCC.............CCCCC DD...........DDD.........DDDD.............DDDDD EE...........EEE............EEEE.............EEEEE NEW LINE
So I for instance want to save Col3 on the last line filled in. Lets say the control is called Col3 then
If the cursor is on NEW LINE I have got the code so that Me.Col3 "EEEE" If the cursor is on the last line (the 5th) I have got the code so that Me.Col3 "EEEE"
If the Cursor is on the first line i get "AAAA", "BBBB" for the 2nd etc. How do I always pick up the last line?
For my work I have created an incident reporting database based on the Desktop Issue tracking database that can be downloaded in MS Access 2007 from the MS website.
I have made a fair few changes to it and it seems to be working well. Managers now want their staff to be able to enter their own issues but have them approved by the manager before being saved into the database. How do I go about this?
The DB does get the username of the person who is logged into the pc.
working through validation rules etc at the minute on my database. Have come across this one is sort of stumping me. I have a tick box in the field "Medication to be repeated" the next field after it is "Date to be repeated on". I am looking a validation rule which makes it that if the checkbox is ticked then date to be repeated must contain a valid date value.
Im running an update query but in the criterial field i would like to include something that instructs the query to be executed only on the value selected in my listbox.
i need some help with the syntax cause i dont know how to bound the query's execution to the selected/highlighted value in the listbox.
I have a query which returns names to a listbox. The query works by a Command Button and 'Requerys' by using the Command Button. But, I cant get the ListBox to refresh on a Requery. All it does is add results of the Requery to the bottom of the list. I'm obviously missing something basic....any ideas?
Been away from access db's for a couple of years and have suddenly job i have to do, and of course the client wants it finished yesterday :rolleyes:
Anyway, my problem is that i have a simple form with suppier details in it - and a combo box which shows the products that that supplier has. The combo box runs on a custom query object i created that matches the supplierID's. Simple!
But for some reason when i change the supplier record, the combo box doesn't with the new list of products. The dynamic QUERY updates just fine, if i check it, however these results aren't reflected in the listbox.
If i use a subform, then that updates just fine. Alas, not the list box, though.
I must be forgetting something simple! Is there some kind of update event i have to create?
I've a BE/FE database where the BE is on the server and the FE on different PCs. I have got linked tables in my FE and the connection between them and the BE is correct; however, users cannot view data entered by others. They can only view data entered by themselves!!
I'm not sure if the records are getting locked that's why they can't see others inputs.
Hi all, Please bear with me if I'm asking a dumb question. I've been tasked to create a database from scratch and I've not had much experience working with Access.
**My Question** Using a form is it possible to have the form automatically enter a "value" in one field based on the information inputed by someone in a different field. ie. When some one puts in a value between 0 and 20 in one field it automatically enters a 1 in the other, and when some one puts in a value between 21 and 30 you get a 2 and so on down the line.
I have a form where users enter data in various ways - combo boxes with drop down selections and text boxes where users manually enter some data. I also have several text boxes that return "answers" based on calculations from user entries mentioned above. The form is bound to a table where all the entered data is stored. I'm having trouble saving the calculated information to the bound table. It's easy in all the non-calced boxes, I just put the column name of the bound table in the control source, but in the calculated fields, I already have the formula in the control source. How can I identify the proper column to save the data in this case.