Copy Queries
Dec 17, 2006
I have 4 different sites with their own data source and have created 33 Queries for the first site. Is there a way I can copy the queries to the other sites instead of recreating them manually? All sites have their own data that is in the same format. All the information is in the same format and similar (different amounts, dates, but all in amount and date fields), they are named differently corresponding to their sites.
EX:
Site 1Site 2
Data 1Data 1
Data 2Data 2
33 Queries(needs the same queries as site 1)
View Replies
ADVERTISEMENT
Dec 9, 2013
I have created a table1, with 3 fields: A, B and C, with 500 rows.
I want to copy this data over to table2 starting at row 700.
What is the sql for this.
Additionally I would like to in the 4th column to write November in the same copy over of the 500 rows.
View 1 Replies
View Related
Mar 6, 2014
I have a table called [Attachments Table], which has the fields:
AttachNbr as autonumber
Task ID as number
FileN as hyperlink
URLText as long text
I want to copy the URL of the hyperlinks stored in the FileN fields to the URLText fields. However, when I run an update query I am getting the full hyperlink code and not just the address.
Example: FileN will appear as a hyperlink like JR1020.pdf, which is obviously formatted as JR1020.pdf#URL#..How can I copy just the plain URL (the stuff between the hash marks) without the hyperlink text names?
Code:
UPDATE [Attachments Table] SET [Attachments Table].URLText = [Attachments Table].[FileN];
View 2 Replies
View Related
Jan 2, 2015
SQL does not copy the field (autonumber) of table1 to another field (number longue) of table2. Is this normal and is there a way around it? Here is the code:
Code:
"INSERT INTO TransUPDSHTbl SELECT TranSHTbl.MemID, TransSHTbl.FirstName, " & _
" TransSHTbl.LastName, " & _
" TransSHTbl.Language, TransSHTbl.Email, TransSHTbl.Federation " & _
" FROM TransSHTbl " & _
" INNER JOIN MembersTbl ON ((TransSHTbl.LastName = MembersTbl.NOM) AND " & _
" (TransSHTbl.FirstName = MembersTbl.PRENOM)) ORDER BY MembersTbl.MemID;"
Above table1 = TransSHTbl, table2 =TranshSHUPDTbl, Field1 = MemID, Field2=MemID
View 2 Replies
View Related
Jan 20, 2015
I have a relatively small data base.
There are a number of what I call reference tables. These are fairly static and in the main will not change.
There are a further half a dozen tables all linked together.
The system basically takes an enquiry which may lead to a repair taking place. The repair will have a number of jobs and each job may have parts replaced.
What I want to do is have an identical database which to begin with will have exact copies of all the reference tables. The remaining half a dozen tables initially will be empty but grow with time.
The user wants to be able to copy the completed repairs he selects over to the 2nd database (which is initially empty). As weeks go by he wants to select further completed jobs that have not already been copied over to the 2nd database. The 2nd database will be updated so I can't just copy over all completed repairs each time.
I had envisage him doing this by using a front end to the 2 databases and firstly selecting which of the completed jobs which haven't been copied over. This is a fairly straight forward query that will update a field on the repair table.
Once he has done this I was thinking that I could run a query that would pull all the rows from the 6 tables from database 1 and update the corresponding tables/rows on the 2nd database.
I don't actually know how to approach that. The process needs to be simple for the user. ie 1. select repairs to copy over 2. run something to copy them over.
View 11 Replies
View Related
Jun 9, 2013
I have two tables pertaining to the same database.
Table [Purchase_Order_Details] amongst many fields have Columns - (Purchase Order #) which is the Primary Key and (Work Order #)
My second table [Order Details] also has a column (Work Order #) . Now I have added another column to this table i.e. (PurchaseOrderNo) - this column is blank as of now.
However I would like to run a query to fill the (PurchaseOrderNo) column depending upon the (Work Order #) which is present both the tables.
View 14 Replies
View Related
Dec 5, 2013
I've got these expressions in a query to extract parts of an mp3 file full path from a field and just let the name of the song.
exp: Mid([imported];[exp3]-[exp2];Len([imported]))
exp2: InStr([imported];"")-4
exp3: InStrRev([imported];"")
exp4: Left([exp];Len([exp])-4)
"exp4" is the clean name of the song.
Now how can I update my "song name" field (which is empty) to be same as "exp4" . Is it an update query? If so how can i do it?
View 2 Replies
View Related
Sep 7, 2013
I'm using Access 2007.
I have a button on a form that when clicked, does the following:
I have a table called [Workorder Parts] that has 128 records in it with Fields named WorkOrderPartID (Autonumber), WorkorderID(Number), PartID(Number), Quantity(Number), UnitPrice(Currency), Notes(Memo), KitID(Number).
I want to copy records into another table called [tKitsWorkorderParts] that has the identical structure based upon a value in the field WorkorderID. For testing purposes let's assume that the field contains the value "12". There are 28 records in the table that have the value set to "12"
If I hardcode the value "12" into the following SQL statement, it finds and copies the 28 records correctly.
DoCmd.RunSQL "INSERT INTO [tKitsWorkOrderParts] SELECT * FROM [WorkOrder Parts] WHERE [WorkOrder Parts.WorkOrderID] = 12"
so far so good.....
Now, on the form there is a Text Box called WorkorderID that contains the value "12".
If I change the code to the following, I get all 128 records instead of just the 28 I am expecting:
DoCmd.RunSQL "INSERT INTO [tKitsWorkOrderParts] SELECT * FROM [WorkOrder Parts] WHERE [WorkOrder Parts.WorkOrderID] = WorkorderID"
I have inserted a few MsgBox displays to display the value contained in WorkorderID and it shows "12"...
What am I doing wrong???
View 2 Replies
View Related
Aug 5, 2014
What's the best way in an update query, using access 2003, to update data in a record based on the previous record having an identical value in a certain field?
For example my data looks something like this, in this example I want row 2 to fill in the blanks with the data from row 1 as they both have the same ID number at the end highlighted in red:
1 2 Anywhere Street 1 2 1 1 5423
2 4 Anywhere Street . . . . 5423
3 6 Anywhere Street 1 2 1 1 6401
4 8 Anywhere Street 1 2 1 1 6402
I've found various threads here on how to copy the whole record but I only want to copy the data from certain fields. More oftem than not the fields I'll be copying to will be NULL.
how to reference a field from the previous record within an update query I could probably work it out from there?
View 4 Replies
View Related
Feb 12, 2014
I am trying to copy the parameter value that is entered to a variable so that it can be used to run other queries without typing it in over and over. Once my form is finished it will run 4 queries, and the current setup is that I would have to retype the parameter each time.
View 9 Replies
View Related
May 21, 2015
I have the following (simplified) normalised data table:
[Account] [SrcUD2] [Amount]
col1 row1 1000
col1 row2 500
col1 row3 500
col1 row4 1000
col1 row5 1000
col1 row6 0
col1 row7 1000
col1 row8 1000
col1 row9 0
col2 row1 100
col2 row2 1000
col2 row3 200
...
I use the query below to pivot the data into the right format for export:
Code:
TRANSFORM First(Amount)
SELECT SrcUD2
FROM source
WHERE LocName="myLoc" AND Entity="LE01" AND PeriodName="QA - 2014" AND ScenarioName="Actual"
AND (Account="col1" Or Account="col2" Or Account="col3" Or Account="col4" Or Account="col5" Or Account="col6" Or Account="col7")
AND (SrcUD2="row1" Or SrcUD2="row2" Or SrcUD2="row3" Or SrcUD2="row4" Or SrcUD2="row5" Or SrcUD2="row6" Or SrcUD2="row7" Or SrcUD2="row8" Or SrcUD2="row9")
GROUP BY SrcUD2
PIVOT Account
which yields the following table as the query result:
SrcUD1 col1 col2 col3 col4 col5 col6 col7
row1
row2
row3
row4
...
which is great except that I want to transfer the results to Excel using the CopyFormRecordset method without the metadata of column 1 (row1, row2 etc.
View 1 Replies
View Related
Mar 20, 2014
This may not be the proper forum, but I don't know where else to put the question. Table1 is a mysql table with a memo field which is set up in a form as a rich text field. I can copy and paste lines from an email and they display properly. Viewing that field in the underlying table they have <br />, etc.
Table2 is another mysql table, containing a memo field in plain text. I need to append the records in table2 to table1. The memo field gets appended as one long run-on sentence with no LF/Cr or <br />. How can I programatically convert the plain text to rich text either before, during or after the append?
View 2 Replies
View Related
Apr 15, 2014
I'm trying to copy records from another base into existing table in current base by:
Code:
DoCmd.RunSQL ("INSERT INTO pivot (RFO_CLIENT_ID, FOLDER_DATE_CREATE, start_time, end_time) SELECT (RFO_CLIENT_ID, FOLDER_DATE_CREATE, start_time, end_time) FROM svod IN 'Z:NPSNPS - Operator - 1.accdb' ")
But it doesn't run. Says insert into syntax error.
View 6 Replies
View Related
Sep 24, 2013
I am trying to run a simple update query to copy data from one column (Addrl1)to another column (Working_Addrl1) within the same file and I can't for the life of me figure it out. Then I need to repeat for addrl2 and addrl3 to working_addrl2 and working_addrl3.
View 7 Replies
View Related
Sep 23, 2005
Hi there,
Can someone help me on this issue?
I want to copy Postal Address Information to Visit Address Information wthin the same record, in my Contact Database that I am building at the moment.
I want to copy 4 fields to 4 other fields within the same Record.
This the current code I use for the Copy-button:
---
Private Sub cmdCopyFields_Click()
Dim v1 As Variant
Dim v2 As Variant
Dim v3 As Variant
Dim v4 As Variant
v1 = Me!Field_a.Value
v2 = Me!Field_b.Value
v3 = Me!Field_c.Value
v4 = Me!Field_d.Value
RunCommand acCmdRecordsGoToNew
Me!Field_e = v1
Me!Field_f = v2
Me!Field_g = v3
Me!Field_h = v4
End Sub
---
The underlined part (acCmdRecordsGoToNew) is false part of this code, because it copies the Adress Info to a new record, instead of copying it in the same.
-Is there someone that can help me with this problem, to make the copy-button in the Form run properly?
-Are there other options to achieve te same?
I have put in a attachment, to give you guys a visual example of what I mean.
Thanks in advance,
Quinten
View 3 Replies
View Related
Nov 26, 2012
Would it be ok just to make a copy of the BE file (every so often) rather than to make a copy via code?The user can then just paste over the original if it becomes corrupt.
View 4 Replies
View Related
Oct 16, 2006
I have created a database with a number of backends. Users have the database on their home PC. I want a simple visual way of copying one of the backends to a usb drive and then having the ability to transfer the mdb from the usb to their work machine.
View 1 Replies
View Related
Jun 14, 2007
How can I copy an existing database complete with tables, queries, forms and reports but without the data to start a new database based on the original
View 1 Replies
View Related
Jan 14, 2005
hoi,
I'm using 2 db one local (LocalDb) and one on a server (serverDb). If the localDB don't have a connection with the server it use a copy of serverDB that local is.
Now must it be possible by clicking a button (in localDB) to copy the database serverDB to its local location.
Is this possible? So yes how?
thanks
koen
View 6 Replies
View Related
Apr 19, 2006
This is actually a rephrase of the scenario I posted in the other thread yesterday.
I have a form, titled "Danish", now i wan to make a copy of it, i.e, its textboxes, buttons and save the new form as "English". How can i perform ALL of the above in coding?
Thks..
FT :)
View 4 Replies
View Related
Oct 28, 2005
Hey what does anyone know anything about a copy function? I think it is vb code but I am not sure. what i am trying to do is to. create a id number using the last 2 digits of the year from the date, and adding a "-" and adding the last record number plus 1... SO I think I have the date things but I am not sure how to do the last record id number plus 1?? I was told it could be done with a copy, I am not sure. what ideas do you have about it??
thanks
View 1 Replies
View Related
Apr 5, 2006
Hi all,
I get information sent to me on email. This information then needs to be transfered onto a database. the information is always the same.
name *****
Date of birth **/*****
consultant ******
ward BLA ******
Is it possible to copy and paste all the information in one go from the email and paste everything into its correct places on a form with one action? This would save alot of time & effort on the users part.
Many Thanks
Samzie
View 14 Replies
View Related
Dec 8, 2006
hi
i have a database x (x.mdb) and y (y.mdb)
i would like to copy some report from x to y
any idea?
thank
View 1 Replies
View Related
Jul 10, 2007
In the attached db I have a form I use in datasheet view to show data. I have an attached subform that the user updates. The user opens the subform by clicking on the + sign to open the subform, the updates the fields clicks the + sign again to close the form. Then repeats for the next record. What I would like to happen is when the user clicks the + sign again to go to a new form is to have the data from the fields below to auto popualte the new form instance. I could do this with a continuous form and it worked but the users would like to see the data in a datasheet design. Is this possible? Thanks...
Me("Type").DefaultValue = """" & Me("Type").Value & """"
Me("Severity").DefaultValue = """" & Me("Severity").Value & """"
Me("EventStatus").DefaultValue = """" & Me("EventStatus").Value & """"
Me("AdminDate").DefaultValue = """" & Me("AdminDate").Value & """"
View 1 Replies
View Related
May 19, 2005
Is there a copy function in a query.
I need to copy a field from the direct previous record in a table and have it loop till the end.
Any thoughts?
Thanks everyone.
Your time is appreciated.
View 2 Replies
View Related
Mar 15, 2007
I have two tables. First table "Orders" is parent, secondary "Works" is child.
In Works on button event in field work_status i have the number, for example "6", which i must have in parent table "Orders" in field status_id. Criteria of this tables is order_id. What i must use? Update or copy? or Insert?
View 2 Replies
View Related