How To Create Two Of The Same Fields Which Update When One Is Changed
Apr 19, 2007
hi
i have two fields that are the same, but in different tables. can i create a relationship so that when one field (in stock) from the purchases table is selected, the same field in the stock table is the same value as the one from the purchases table... i hope i explained it well enough:)
i know this causes data redundancy, but is there any better way of doing this?
i have a form that shows payments (checks) that have been issued. sometimes those checks need to be voided and i want 2 fields (Updated By and Updated Date) to pop up when the payment distribution field is changed to a void status.
payment distribution: "I" for issued and "V" for void
i've gotten the On Change Event to work with VBA when the payment distribution changes from "I" to "V" and the 2 new fields pop up but if i exit the form and go back in to look at that record, the fields are gone. Is there a way to make the fields permanently if the payment is "V" on the form?
this is what i have so far for the On Change Event:
If [payment distribution] = "V" Then me.cmbo_UpdatedBy = True me.txt_UpdatedDate = True Else me.cmbo_UpdatedBy = False me.txt_UpdatedDate = False End If End Sub
I don't have any database experience whatsoever so please go easy. I'm guessing this kind of this is extremely simple for all of you.
I'm constructing a database of network resources and devices and I'd like to automatically update the values in one field based on the values of a field in another table.
The first table is called "IP" and the fields are called "Address", "IP Type" and "Device". The second table is called "Devices" and contains the fields "Name", "Description", "Asset Number" and "IP".
Here's an example of the tables: (ignore the "code" tag. i've only used it to align my columns properly)
What I want is for the Device field in the IP table to automatically update it's values based on the values found in the Devices table. In this case, the values that should appear in the Device field in the IP table are "Xserve" and "ProliantX".
I've searched through but haven't found a complete solution, just little pieces which I'm too inexperienced to put together myself.
I have a copy of the back-end that gets a search key error 3709 on two records. In other words, I can duplicate the problem.
The interesting part is that I can update any other field on both these records and save the record, but when I try to change two specific fields, I get a Search Key Error and have to ESC out to continue (basically UNDO the change). Both fields are text fields with lengths of 7 characters and 255 characters, and both are COMBO Boxes on the form.
I tried to focus on the form think there was an issue in the code. I can definitely TRAP the 3709 error on the ON ERROR event on the form using "if dataerr = 3709", but then I tried something even simplier.
I went directly to the table and to each of the records. Again I can update any other field in the record but these two specific fields. When I try to change either of them and move to another record, you get a Search Key Error 3709.
By going to the table record directly I'm as low level as I can get. There are no validation rules on either field at the database level. If it was truly CORRUPT would it let me update any of the other fields on either of these records? One is an empid (not a primary key but is indexed with duplicates okay and not required), and one is status code (not a primary key but is indexed with duplicates okay and not required) so they're no critical fields, but something is keeping them from CHANGING.
Just tried something else; deleted the INDEXES on both the fields. Now it works! I am completely confused now because it really wasn't a corrupt record, but the indexes are causing the problem. Do I need to update the indexes somehow when the users selects a new empid or status code?
Ok, i have a question about update queries.I have two tables (I'll call table 1 and table two for simplicity) and an update query. I want to get some data from table one to table two (via an update query). But in table two there is a field that isn't in table one but i want to add a value to that field via the query.My question is, can i manually put into the query what data to add to a field instead of/aswell as using data from other tables.I hope you understood my questions.Cheers
Is there anyway to create update patches for the access application? If the users are going to use the application for entering data, how can I just provide them update patches for th application if I make some changes in application in future, is it possible in access? I dont want them to change the application by themselves, so I can just make some updates and provide them, without causing any disruption in their datas.
I am a first time user of access. i am trying to create an Data Access Page which will list all entries in a table and then allow me to add, change and delete them. I have created the page using the wizard but it will not let me add, delete or update. i view all the entries at one time but that is all. the navigation toolbar shows up at the bottom but it is grayed out. any ideas on what i may be doing wrong?
Hi... I searched quick, didn't find anythign, but you guys are so responsive... :D
Question: Part 1. On TimeSheet form, I want to click to "create new job", and the Jobs Form opens, at a new record. Currently it opens at record 1.
Part 2. I foresee that when I return from the modal job form, the old form (timesheet) would not have updated the combobox to show the jobname I just entered.
I guess this is what subforms are, because I keep reading about them, but dunno what they are.
I have a tabular form that lists all the records (address book). I'm trying to have a combo box filter the records by selecting a contact type (employee, supplier, customer). So far I have the contacts displaying in the combo box.I've tried to create a macro that begins "after update". Its an ApplyFilter macro.
Where Condition = [Contact Type]=[Contact Type Select]
[Contact Type Select] is the combo box.
When I do this, a popup box appears. When I type in the item I want, it works. I want this done automatically.
I'm working to create a staffing database that houses changes to staffing week over week.
I have one primary table, the "empMaster" table, that stores the employee's name, contact information, etc. I have other individual tables for noting which employee reports to which manager, what their business title is, what group they're in, their training history, etc.
Once I've populated the empMaster table with employee information, I want a form that allows me to update each of the other tables IF there as a change. Some weeks will have a manager change, some only a business title change, some a group change, some a training change, some all of the above. The problem I run into is that I will sometimes process hundreds of changes a week, sometimes only 10-20 so I almost have to use datasheet view for mass edits. I'm relatively new to Access and I'm having a hard time getting my form to allow this level of flexibility and to update all fields needed.
When I build a form that includes more than two tables (let's say I want to update a Manager and a Business Title), the form will not work and populates nothing. I believe it's because Access wants there to be an existing record to match to across all three tables and there will not always be.
How do you create a form that is not tied to one single record source? In other words, I want to be able to select the record source that it updates. I have a bunch of tables that have the same data structure but are separated due to geographical nature among other reasons. Is there a way to do this?
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:
Hi everyone, first off, I did a search of "combo box fields" and it turned up some results but after going through them, I still didn't think it answered my question.
I want to create a combo box of fields from a table. After selecting a field, I want to choose from another cbo either "Yes" or "No" to fill out that particular field.
I'm using Access and Excel 2007.... I know how to import an Excel spreadsheet as a table.
I have several supplier price lists in Excel. I want to keep my vendor price lists up to date.
When one of my vendors tell me that a price has changed on a particular item, I figure that I could have a form that I could use to enter the changes.
I believe the form would look like:
Field: "Vendor" (drop down list to choose from. Name of the Supplier price lists) Required. Field: "OEM" (Key Field found in each table) Required. Field: "Brand" (Field found in each table) Not required. Field: "Price" (Field found in each table) Required.
OEM would be the unique key field.
If I enter the Vendor name and then the OEM number it would show if there is already that number in the Vendor price list and I could make changes. Or I could enter new data in that vendor price list.
Hi, Thanks in advance for your help. I'd like to concatenate 2 name fields being TeacherFName and TeacherLName. No problem with that bit. The bit I'm not sure on is that I'd like to have just the first 4 letters from the last name and the first 2 from the last, unless the last consists of less than 4 letters then I will fill with the first name. IE Dianne Cox becomes coxdia. Can anyone help please? Regards Matt
I have a table with the following columns: Task, Visa type, time it takes to perform the task. There are several taks that are performed for all visa types. I want to create a form to enter data to the table in which for the field visa type I have a list box that can allow multiple values, however, I do not to create a single line with the task and on visa type all the types of visas selected. I want to create a line for each type of visa with the information introduced.
I don't know if this is possible, the reason for which I want for the form to create several rows depending on the visas types is because then I have a query that sums all the types of visas. Can this be possible? I don't want the people to introduce manually directly to the table the data and also that for the same taks they have to enter manually 50 rows with values. I want it to be more simple and easier.
I have attached a zipped excel workbook to best describe what I'm trying to do. I have table1 and table2 and I'm trying to write a query in access to get the output as shown in the workbook. I'm having hard time getting this right. I would appreciate your help if possible. Tks
I have a quick question that could lead into a longer one.
First off, I am trying to associate tests with a course a student is enrolled in. Would it be better to add a column in the courses table and have a comma separated list of all tests associated with each course or would it be better to create a separate table that has a column for the course and another column for the associated test with that course?
If comma separated fields would be better, how would I handle that in forms? How does one parse that field?
I am editing data in a table that was designed by someone else. For some reason, they divided the date into three columns (YR, MON, DAY). I would like to join these three fields together and create a legal DATE field. I have tried the following:
SELECT YR AND MON AND DAY AS TheDate FROM MyTable;
However, it returns an odd result. I think this might be because ACCESS does not know I want a date format.
My question is: is the above QUERY correct and how do I tell ACCESS to put the concatenated data in a date format.
All, using access 2010. I am working with an existing database that have a letter programmed using fields in a query. I have to add to it but having a trouble. Merge in Word was not used. I can't find any examples. The letter is designed in a report design. Using the fields from a query and filtered by "IIF Statements".
How i would best combine values in a table to produce a 'primary key id number.'
For example: the first letter of a city in the ID and the next number available/auto number - Portsmouth -> P233
I know i can create this in a query however i want it as the unique ID for that record entry in a table. If that doesn't make sense i can try to elaborate some more.
I am extremely handicapped in Access 2010. I am currently trying to create a database for a small company I am interning in. One of the things I would like to do is to update or create multiple fields in different tables simultaneously.
To explain, I have two tables, Production Activity in CY 2012 and Production Activity in $ 2012. Both tables have a field "Date of Activity." In addition to some other fields, Production Activity in CY has a field "Actual Production in CY" and Production Activity in $ has a field "Actual Production in $".
Now I had initially created two forms, each dedicated to one table, however my supervisor wants to use only one form to update both fields.
I also want to know how can I connect/link both of the Date of Activity so that if one changes, the other one changes too. And when I run queries, both "Date of Activity" fields should appear as one (when I want to run query of let's say the maximum or minimum production each month).
trying to create an update query to Budget table using the Access Design View:
Field: PctSls (in tblBudget) Update to: [Expense] / [Sales]. The update query always returns 0. However, if I create a Select query using the same calculation, the correct results is displayed. PctSls is defined in the Budget table.
I haven't worked with Access (2003) for several years but this seems too simple to be causing me such frustration. (Was only a casual user even then).
I need to create a message box or a form or something to flash on the screen to tell the user that a piece of "Update" code is running. the update code will be updated reports from marketing returns, but the 3 branches who use the information are separate so I am creating an update form to download and update the table.
The code for the update is already working, but can take a while, so I thought a message or splash screen would be useful as the update runs on start up.
It would have another use, I have a report which is made mainly of calculated fields on an onPrint event and also takes a while to work it out, so a similar screen would be more useful than my current spinning circle and blank screen.
I've got a fields called rev code that contain the following values:
field name: 110 131 250 255 258
field value: 7.49 6 11.25 12.11 78
I'm writing a query that pulls from the first two digits of the rev code and need to round off to the nearest dollar so in my query I'll have a column 11 with a value of 7, a column 13 with a value of 6, then I need to take columns 250 255 and 255 add the values together and round off so I get a column 25 with a value of 101.