I created two tables, let's refer to them as Cars (VW, BMW and Audi) and Colours (White, Black and Grey).
Is it possible to create another table based on these tables - i.e. in the new table the rows will be the Cars and the columns the Colours as such:
White Black Grey
VW
BMW
Audi
And should I enter another Car or Colour in one of the first mentioned tables, then I would like this "new" table to update automatically. For example, if I have a new Car (say, Merc), then I would like the "new" table to update to the following:
I am giving two tables and I need to create a macro that automatically updates these tables depending on the value of a Yes/No field. If it's No, it's in the 1st table TableOne, if it's Yes it automatically updates to TableTwo.
So, the best way I saw to go about is to set up an append query and then create a macro that runs it
So my tables have the values FirstName, LastName and isValid (more but keeping it short)
So for my append query, I put TableTwo in the pop up I get. Then, where it asks for the field I put it
I do this for all (it was autocompleted except the Criteria field). I tried to keep Criteria with data only for isValid but that didn't work. I wrote it for all the field names, still didn't work. Whenever I click run it says it'll append 0 rows.
I have an ordinary table with 20 fields and in the design view the primary field is shown as an auto-number, but it doesn't appear in the datasheet view.
I have a crosstab query of which I cannot sort a Totals column by descending order. Is there any way to sort a certain column automatically after the query runs and is in Datasheet view?
I have a Combobox so the enduser can search and select items for the form below it rather than clicking the arrows for Next/Previous.However I have an issue with DLookup queries.My Combobox is called 'F_ComboBox' (I use F_ in my forms to indicate it's a form textfield and not from a table).My first field in the form, called 'F_ProdID', I want it to select the rows ID from the Combobox option selected. So it's simply:=[F_ComboBox]Which works fine, it shows the ID for what I selected... but when I do this to show my ProductName...=DLookup([ProductName], 'Products', [ProdID] = [F_ComboBox])Or the same but using the first textfield:=DLookup([ProductName], 'Products', [ProdID] = [F_ProdID])It loads once but if I select another item out of the Combobox it doesn't change, it just stays on the last result. So the query works, just doesn't refresh when a new item is picked from the ComboBox.Am I doing something wrong?Thanks,Nick.
I have a combo box on a form with claim #s. When selecting a claim # the appropriate record displays, but when using the record selector to advance to the next record, the combo selection does not update.
Upon closing my frmInventory the amount stock of stock is checked against a minimal stock value. If the stock amount is below a set minimal value a subsequent form is opened telling you that stock is low and an email message is generated to notify a manager. I have a checkbox on that form which is set to "True" upon close using an update query. The checkbox is there to give users the option to either send or not send a reminder message that stock is low when a message has already been sent earlier.
The problem is that using that update query ALL records are set to "sent=true" and not just the 1 record I intend.
This is my code in the "on close" event:
DoCmd.OpenQuery "qryUpdateEmailMinimal_True
and here's the SQL:
UPDATE tblInventory SET tblInventory.emailSentMinimal = True;
I assume what is missing is a reference to an inventoryID number. How do I do that?
Code: "UPDATE Individuals SET [ShareholderOf] = " & Me.CompanyNo & " WHERE [Name] = '" & PerName & "';"
However, doing so will obviously change the "Shareholder of" field into what the user inputs (Me.CompanyNo). What should I use if I want it to ADD the user input rather than REPLACING the old [shareholderof] value?
Please refer to the attached file. The form of concern is frmAssessmentInput.
Select the appropriate criteria per instructions (in red), including entries on the continuous subform. Then click the "Input data" command button. A 2nd form opens (frmObservations) that contains a textbox labeled DocumentStreamID, and this textbox SHOULD contain the value from the corresponding DocumentStreamID textbox contained in the master form, where you clicked the command button. However, even though the sources are linked properly, the value doesn't pass if you click the command button immediately after adding a new record to the continuous form; it only passes if 1) the master form is closed and reopened first, or 2) if you close the 2nd form, toggle to design view and back to form view for the master form, and then click the "Input data" button again.
What is going on here? Given that the value passes once another procedure is run, do you think this a requery problem? I tried placing a VBA control requery in the 2nd form's On Current and On Load events, but this didn't solve things for me so I took out those event procedures (code could have been wrong though).
I'm running into an issue with my forms. I have a form that contains a subform, that contains a list of projects. This list is read-only. To update a record, you can double click on it, which opens another form filtered on this record, and which contains the fields in the first form as well as some others.
I have a command button on that last form to "Save and close", which fires up a macro that saves the record and closes the window.
Now, the issue that I'm having is that, when the window closes and I'm once again in front of the first form with the list of projects, the values of the record I changed are not updated and when I click on another record, Access tells me there's a conflict in the values and asks me if I want to keep the changes, discard them or copy to the clipboard.
It seems to consider the old values from the first form as a change, and thus asks me which to keep between these, and the actual (proper) changes I made in the dedicated form.
For the proper changes to be applied, I need to select "Drop changes".
I tried to requery the first form, also undo the changes to it after closing the window, but none of that worked.
I'm actually basing this on one of the templates, which does exactly what I want and which obviously works...
I have a datasheet form that is used to update existing data in a table. One of the fields that can be udpated is Department. On the table I'd like to update, the DepartmentID is stored. The DepartmentName is stored in a seperate table.
I would like to use a combo box so users can select from a list of Department Names, then update the DepartmentID field in the main table. However, it appears the combo box can not be "bound" to the DepartmentName field in the Department table - every time the combo box is changed it tries to update the Department table. If I make the combo box unbound, no data appears in the combo box so users can't determine what the current Department is.
Using the Form View I could set a default value for the combo box based on the current record, but that doesn't seem possible in the Datasheet View. Is there a way around this?
I have a small issue with the before update event, it is triggered for every record of my subform in datasheet view rather than just once when the user leaves the subform.
I have a module which is called from my form and all the subforms. It tells the user that changes have been made to the record and gives them the option to undo. This is to prevent accidental editing when viewing records. This works fine, but sometimes the user must enter a number of records in a subform and so they must answer the message box every time.
Is there any relatively straightforward way to accomplish the warning and undo when the user leaves the subform rather than the individual record in it?
A quick attempt at lost focus and before exit demonstrated that these were not the way to go.
For reference, here is the before update code and the module
Option Compare Database Option Explicit
Private Sub Form_Before Update(Cancel As Integer) On Error GoTo Err_Handler
Public Sub Confirm_Change() On Error GoTo Err_Handler
Dim Msg, Style, Title, Response
Beep
'Define message box Msg = "You have made changes to this record. " & Chr(13) _ & Chr(13) & "Click 'Yes' to save changes " & Chr(13) _ & Chr(13) & "Click 'No' to undo changes " Style = vbYesNo + vbExclamation + vbDefaultButton1 Title = "Record changed - Confirm save" '
'Check which button pressed Response = MsgBox(Msg, Style, Title) If Response = vbYes Then MsgBox "Record has been updated with your changes", vbOKOnly, "Record saved" Else DoCmd.RunCommand acCmdUndo End If
I have a query (SelectedData_Query) , on which a form (SelectedDataQuery_SubForm) in datasheetview is based, which is placed on a form (NAWInvoerForm) where customer adress data is put in. When someone clicks new case button on the NAWInvoer_Form, another form (CaseDateTimeInfo_Form) is opened, data is entered, but when the "CaseDateTimeInfo_Form" form is closed, the data in the subform in datasheetview on the NAWInvoerForm is not yet refreshed. So I tried the following:
Private Sub Form_Close() '------------------------------------------------------------ ' RefreshNAWInvoerForm ' '------------------------------------------------------------ On Error GoTo RefreshNAWInvoerForm_Err
Which works just fine. After the form is closed, the name, adress and cases overview form is reopened and refreshed, thus the case that has just been created is shown nicely in the subform which is based on a query.
But it is starting to become bothersome, sometimes when I close the form in which I create a new case, I don't want to have the other form (NAWInvoerForm) reopening again.
So how can i make it so that when I close the form only the data in the "NAWInvoer_Form" is refreshed, without having to reopen the form again. I mean, in the background, the form is still open anyway. It just shouldn't keep popping up everytime.
It can't be hard, but I can't see it. I'm new at this. I have found some similar topics on this forum, but none which helps me out enough.
It should be something like:
On "thisandthatevent" do a "thisandthatcommand" on "thisandthatsubform" in "thisandthatform"
If I know how the syntax of that is done, it would help me out with some other problems I see coming in the near future. I've looked at, and tried some things based on this link: http://www.mvps.org/access/forms/frm0031.htm But without success.
I am currently handling an insurance operation. I have 5 Sales Executives (SE) who receives certain percentage of commission for each sold insurance policy. SE receives their respective commission on a pro-rata basis. Meaning, if they give 4 equal monthly payment scheme to their clients, they will also receive their commission -- 4 times.
Example: SE Commission for one sold policy is: 100.00. (Granted SE gives 4-month-term, SE will be receiving 25.00 monthly, upon cleared payment)
On my 2 tables lies the following fields: [Table1] SECom1 SECom2 SECom3 SECom4
Dear all, please excuse the fact that this is not an explicit problem I have, but more of a general query.
I have an Access database (2003) with a load of contact details in it. Including various fields for each contact, such as their email, services they offer, where they are, main contact name etc.
Some of these contact details will be out of date and I want to make sure that all the contact details are up-to-date.
I am in the process of setting up a mail merge with a Word document which will output to Word their relevant details, and this can then be e-mailed to each of the contacts with them to update and e-mail back again. Someone would then manually update each of the contact details.
This is quite a time intensive way of doing it, and I wondered is there a way of automating the process? I don't have the time to put the whole of their details on a website so they can update it over the web, but is there a way that access could possibly read the return Word document to automate updating their details? Or is there another easier way of doing it, without using word and using something else such as Excel or something.
If anyone has any experience in doing this kind of thing I would be really glad of some tips.
hello all i have a problem, i have a form bounded to a query that displays the books infos, in this form i have a list control that displays the list of authos based on the code of the book the problem is when i have more than one record in the opened form ie more than one book and i move to the second record the list doesnt change and displays the authors of the first book when the form first opened anyone has an idea how can the list be updated automatically when i move between records thanks a lot
why my vba code wouldn't work.I have a scorecard form, and what I wanted to do on a form was that if a user enters a number in a bound box (to a table), it would automatically update an unbound box. So I coded it as this.
Private Sub SupplierCorrectiveActionRequests_Enter() If [Request] = 0 Then [Text30] = 100 Elseif [Request] = 1 Then [Text30] = 75 Elseif [Request] = 2 Then [Text30] = 50 Elseif [Request] = 3 Then [Text30] = 25 Elseif [Request] >= 4 Then [Text30] = 0 End Sub
But it throws an error that there cannot be Then if there are no ifs, weird.Another problem I had is that I'm using a continuous form, and whenever I scroll down there seems to be a visual bug,is there any way to do that without changing the theme?
In my Access form, users update 4 checkboxs when their work is completed, when this 4 boxed checked then the 5th checkbox will check automatically using afterupdate. Now i have added the 6 the column with date completed, here i want the date to be updated automatically when the 5th column is checked automatically. how to do it?
I have a form fmrClasses and what I'm trying to do is write a code that as soon as the user types a beginning time will update the end time to 3 hours later for example If user enters 9:00AM for beginning time the end time will be set to 12:00 pm.
I have created a parameter query that uses a combo box form. The people who will be using it when completed do not want to see the results in query form. Is there a way to have the query update a form or report without having to create and reformat each time?
I'm fairly new to using Access for any serious purposes. I'm trying to replicate some database functionality I setup in Salesforce and just trying to clear few core concepts in Access.
I'm messing around in the Contact Management template and I'm wondering how I can make it so when so when a yes/no checkbox field (called "Active") is ticked a date/time field (called "Last Date") is automatically set to today's date + 60 days.
In Salesforce I would create a Workflow Action triggered by an if Active = true statement, with a Field Update something like TODAY() + 60.
I can tell I need to create an After Insert/After Update Data Macro but can't quite figure out what to put in.