a have a form with a combo box that displays 3 values (columns)
in a bound form i can display the second value in a text box with the following command
=Forms!MAIN!field_2.COLUMN(1)
but i can't write it to the table
my main table has 3 fields
field_1
field_2
field_3
i have a secondary table that holds some values and is been used as a lookup list to field_2
my secondary table has 3 fields
field_a
field_b
field_c
the field_2 of main table takes value from field_a (the lookup list shows all the fields (a,b,c) and i want in text field lets say field_3 to take the value of field_b with this code
Forms!MAIN!field_2.COLUMN(1)
The problem is that i want the value of Forms!MAIN!field_2.COLUMN(1)
to be written to a field of the main table :( and i cant
I have a form which has an unbound text field which is a calculated filed showing a date which is x months after a separate field on the form.
I need to write this field back to a table in the database when an "add" command button is clicked.
The table is called Assets The form is called Assets List The text field on the form is called txtWED and needs to be written back to the table "Assets" in the field "Warranty_End_Date"
If possible can I add this as an expression on an "add" command button?
Hi I have a small database written in access 2000 which has be compiled as a mdb, this resides on a file server and can be run from a number of workstations on the network . It has been running ok for 2 years until a couple of weeks ago, on one particular pc the database opens and you can do reports etc view exist data as normal ,but you cannot write to a table ( these are contained in a second table only data base ) if you run the program on any other pc workstaion it works fine as it has for 2 years on this problimatic PC.
it must be something on the particular pc , we have reinstalled Access 2000 to no advail
I have a form based on a query where I want to document the status of certain records. The original data is on a SQL server so I am linking to it in my query. I have a local table with the added fields to document my review and status. My query has both tables in it and are linked by the report number. So I have join properties to show all records from the SQL database and only the records in the local table that match. So initially the data in my local table will be blank. I want to use the form to add comments on the status. The problem is, when I type in the form fields nothing happens. It's like the query is confused and won't let the form write back to the local table.
So my question is, do I have my query set up properly so that I can read the fields from the SQL database and yet write in my comments to the local table. I am using a select query.
I'm having trouble with some code. I have two combo boxes on my form. When a user selects a value in the first combo box, I want it to find the information for the corresponding record in the table. Then, in the second combo box, if the user selects one of two values (two full names), I would like that value to be written to the table for the corresponding record of the first combo box. I'm not sure how to transfer data from what the user selects in the second combo box to the table. I've inserted a command button called "Update Table". When user clicks on this button, the table should be updated with the 2nd combo box's value. Please help!
I am sure that in earlier versions it was easy to write the result of a calculated field on a form, back to a table, but I can't find the method in the help file for the current version of Access.
I have the requirement to write EACH record from a table to its own CSV file with name of the file being combination of 2 fields
So let's say I have Table1 with 3 columns (Field1, Field2, Field3) with following content :
Field1 Field2 Field3 AA 1 ABC AA 2 DEF AA 3 GHI
I should get 3 files with names AA1.CSV, AA2.CSV and AA3.CSV and each file contains its respective row from the table.
I tried to do it with DAO Recordset, but I do not find a way to write only the current record from recordset while looping.
See below the code I was using, but issue is that code does succesfull creates the 3 CSV files as per above example, but in each file it writes ALL 3 ROWS instead only the respective ROW.
Code: Dim db As DAO.Database Dim rs As DAO.Recordset Dim strSQL As String Dim strFilename As String
I have a query with many fields. One of them is the combination of two fields and is called "Components Reference". What I try to do is, every time this query is updated, the records of only this field "Components Reference" to be written to the field of another table which also takes records from an another query. I wish I was clear enough.
I am the first to admit I struggle with looping through records.
I am trying to loop through a table and collect external income data and write it to a new table.
My issue may be the way the table is laid out. ???
The attached pictures show the tables. The tblExtInc is where the data are. I am trying to create a table that looks like tblExtIncYr that shows each year and separate entries by item.
How would I loop through tblExtInc and grab ex:$2000 every year for upto 100 years but only get the $1000 for year 6,7,8 only?
Can anyone help? I need to write data from a single form to two separate tables simultaneously. The data will need to overwrite existing data in the first table & add a new entry in the second. Any help would be much appreciated.
I have form "frmOrders" (Datasheet), columns: "id_order", "nameOfOrder", "worker", "term", "changes"I don't know it's possible or not.
e.g. I have in some record values like this Id_order - 2 NameOfOrder - folder Worker - John term (this field is empty)
some day I will change e.g. nameOfOrder from "folder" to "business card" and term from empty to 2013-07-13. So two records was changed. After changes, record "changes" should has value like this "folder; term" - because I changed these columns.
see below the code . The select statement searches the Printpoolno value from the top to bottom in table tblmaster. As in my table tblmaster there are thousands of records and it takes long to search for that Printpoolno from the table . Is there anyway we can write a query that will search the table from bottom to top as the Printpoolno will always be in the bottom records and not in the top records.
Code:
Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim r As Long
I have a list box whose data is inserted in a table named as "test0" ,now in a macro of vba i want to select all the items in the list box and create there pdf files in a folder at my desired location. So far i have managed to create a pdf file of single item ,but i want to select multiple items at once ,
Code: SELECT test0.ID, test0.item FROM test0 WHERE (((test0.item)=[ItemNumber]));
So, in this query itemNumber are multiple and i want to create there pdf files at once ..just on a click of one button ?
what is the correct syntax to write a command line able to UPDATE more than one field in the table records having multiple WHERE criteria.
Here is my challenge:My TableI has the columns A, B, C and D which are populated, for example, as follows:
TableI A B C D 1 2 2 6 4 3
1 7 5 9 1 2 2 5 8 5 etc.
I also have a FormII which updates TableII. Among the existing fields of TableII there are the fields C and D (same as above). When saving data entry thru the save button of the FormII, fields C and D will be naturally saved on the TableII. Well, I also want C and D info updated into Table I as well, but only when field A=1 and B=2.So what I need (for the click event of the button save in the FormII) is to open TableI and either insert or update it with the values of the fields C and D in every record WHERE A=1 AND B=2.For instance, assuming C=& and D=%, the desired result should be as follows:
TableI A B C D 1 2 & % 2 6 4 3 1 7 5 9 1 2 & % 2 5 8 5
I did not find any examples in the net including multiple criteria..Here is what I wrote unsuccesfully:
Private Sub BtSalvarFrmII_Click() CurrentDb.execute "UPDATE TableI" Set FieldC = Forms!FrmII!FieldC.value AND Set FieldD = Forms!FrmII!FieldD.value WHERE FieldA = 1 AND FieldB = 2 Docmd.save Docmd.close End Sub
Does a (the) .ldb file have to be closed for another user on a network (separate FE linked to network drive BE) to read/write info to a table? Or even select info from a table?
Where does one start to look for information on what is needed to set up an online web form that can write to an Access database? I'd like to learn how I could possibly set up an online registration form for clients to use via a web page. I don't really know where to start, but I have seen some information on asp.net stuff. What's the easiest path?
Well I know why this happens b/c the table that the information is being pulled is the subsequently being updated however when moving to a diff customer or closing the form etc.. The user is then displayed the MsgBox of Write Conflict and supplying the user with 3 options of Disregarding Changes, Saving changes to Clipboard or Save Changes.
Baisically is their a way to restrict this write conflict msgbox and have it so that it saves the users changes every time.
The VEH and POS are just going to be Labels in a form....no prob. Each Soldier's Squad and Team (for mounted Vehicle and Position) are stored in the Personnel Table. The below query is for vehicle A7 (ACTUAL would be the same as TC above). The query works. I just need to know how to get the result to display in a text box. What I'm planning on doing is creating text boxes for each posistion with these small select queries, so when I update the SQD and Team in the Personnel Table it updates on this form. Or is there an easier way to do this?
Dim strSQL as string strSQL="SELECT [tblPERSONNEL]![RANK] & " " & [tblPERSONNEL]![LAST_NAME] AS NAME FROM tblPERSONNEL WHERE (((tblPERSONNEL.SQD)="A7") AND ((tblPERSONNEL.TEAM)="ACTUAL"))"
i need to update some textbox value when insert some value at another textbox.. like when i add 3 at 1st textbox, 2nd text box will calculate it auto matically wit this formula, 2ndtextbox = 1sttextbox - 1 ...
so where should i type ? query? how? default value? if need to wrte code, which 1 i need to write it? after update? before update?
on my laptop, i have an access front end with tables linking to sql server personal edition.
i open a linked table, edit a field, and i get a write conflict error message 'this record has been changed by another user since you edited it', and the save record button is not enabled
i have many linked tables, but this is the only table that gives me this error. i have deleted the table in sql server, and made a new table, and started the link process again, but still the write conflict.
also, as i dont know if this is related.
when i get tothe screen to link the tables, i see 2 table names prefixed with a "~", however, when i go into sql server, i cannot see any tables prefixed with a "~"
any responses would be most appreciative, as my project has effectively stopped until i can resolve this.
What is the best way to go about doing a 2.0 version of a database? When I wrote ours I was a newbie. Not that I am an expert now or anything but things could definately use an upgrade!!!
I need to clean up the forms, etc. Do I just dump all the tables in from the old one and start over?
I also want to completely revamp a couple of things. How would I make sure that all the purchase order numbers (auto number field) still matched?