Copy Function?

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 Replies


ADVERTISEMENT

Copy Function

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

Disabling Copy And Paste Function

Sep 22, 2006

Hi there,

I am a database designer for a UK Insurance company and have recently needed to rebuild our complaints database. One of the problems with the previous database was that staff were copying text from an application designed by Pacific Solutions (PACSOL). When the data was pasted into our Complaints database, it was causing some serious issues that made the database crash. This had started to affect people's confidence in our ability through no fault of our own. We then found out that this was due to the character set of PACSOL not being supported by access.
What we would like to do in the new database is prevent users from copying and pasting text into the system. Perhaps by displaying an error message when they press CTRL+V or do edit - paste.

Does anyone know how this can be done?

Thanks

Gareth

View 11 Replies View Related

Modules & VBA :: Export Function Not Working If Link To Different Copy Of Tables

Aug 21, 2014

I have a code module in my interface with 3 functions that run via separate forms with user inputs. Each function is similar in design, exporting data from a generated query to excel for input into external software.

The database is split into an interface FE (Access 2007) with linked tables BE (Access 2000). I have successfully tested each of the 3 functions in my code module with a set of tables containing fake test data. However, I have discovered that if I link to a different copy of the .mdb tables, 2 of the export functions no longer work and the third one still works fine.

What is causing the problem but the part that is not working correctly is the loop.

Here is my code module:

Option Compare Database
Option Explicit
Public Function CreateQCStaticChartsforReports() As Boolean
'Define variables for Static Chart creation
Dim qdf As DAO.QueryDef
Dim strSQLStatic As String

[Code] .....

View 2 Replies View Related

Tables :: Copy And Replace Existing Records Function In Access?

Dec 3, 2012

Is there a copy and replace existing records function in access?

I.e. I would want to copy records from one table to another (with same structure) and replace similar records with in original table in the new records (which have minor ammendments made).

View 3 Replies View Related

Copy Button In A Form To Copy Fields To Other Fields In The Same Record

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

General :: Make A Copy Of BE File Rather Than To Make A Copy Via Code

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

Modules & VBA :: Creating A Function That Counts Records And Use That Function In A Query

Dec 11, 2013

So basically I need making a function that will count the number of records from another table/query based on a field from the current query.

View 2 Replies View Related

Forms :: SUM Function Produces Error From Calculated Function

Jan 30, 2014

I have a project at hand and it's been a predecessor of mine and client has asked me to do some work on it and extend functionality - but I have not really delved into Access before and I have had to worked my way through to this final snag :/

The Main Form has one sub form. This sub form allows the user to add multiple order items i.e. qty, stock, description from records within the system - fairly straight forward.At the last column of each row is the sub total of those particular items i.e.

Qty Unit | Item ID | Total
-----------------------
2 | 1234 | 80.00
------------------------
1 | 43526 | 20.00
------------------------
> | |

So the total is a function of =[Qty Unit] * [Unit Price].Then in the Footer of this SubForm is the Sub Total

=SUM([Qty Unit] * [Unit Price])

All fine and well..... However, the additional functionality kicks in.

Lets add the additional customer_id from the Main Form. Each Item bought is dependent on the customer_id i.e. they get special prices depending on who they are.So a New table is made which has the Item ID and SpecialPriceID (of a table to define as a specialPrice) and the Price linked to this Item and Special Price category. So say that there are two groups of users "wholesale" and "nonwholesale" these would be SP_1 and SP_2 and each client is defined either one of these, and each stock item has a Price for each SP_1 and SP_2. Hopefully I've explained myself there.

Back to the SubForm. So now the Total needs to calculated differently with needed the external customer_id from the Main Form.

Code:

Function CalculateSpecialPrice(ItemID As String, CustomerID As String, Unit As Integer)
Dim SPSelect As String
SPSelect = "SELECT Price FROM [Items_SpecialPrices] WHERE"
SPSelect = SPSelect & " ItemID = '" & ItemID
SPSelect = SPSelect & "' AND SpecialPriceID = (SELECT SpecialPriceID FROM Customers WHERE customer_id = " & CustomerID & ") "

[code]....

its the sub total I just keep on getting #Error on. I have even watched (using alerts) that the correct return variable is the same as the individual rows. This is the equation I used for the SubTotal within the footer.

=SUM(CalculateSpecialPrice([Item ID], [Form]![FormName]![CustomerID], [Qty Unit]))
#Error

View 2 Replies View Related

Date Function/need Time Function

Jun 9, 2005

We have a date function that converts a text date format. Can someone help me with time function to do the same thing? We want military time. The field is like this now: txt fields.
160037
213137
224356
235716
235800
12341
21708
22732
Here is the date function we use:
Function f2Date(strDateOld As String)
Dim strDate As String, strMonth As String, strYear As String
strMonth = Mid(strDateOld, 5, 2)
strDate = Right(strDateOld, 2)
strYear = Left(strDateOld, 4)
f2Date = strMonth & "-" & strDate & "-" & strYear
f2Date = CDate(f2Date)
f2Date = Format(f2Date, "mmmm d yyyy")
End Function

View 9 Replies View Related

Now Function To Convert To Date Function

May 25, 2006

Hi all,

I need a little help. In my DB, I have a command button set up (I was tired of typing in dates) for date, but I used the Now function, which also gives me the time.

Now I have over 3000 subrecords of the main ones. I now need to queries transaction for that specific date, but it also retrieves the time.

I tried to go back and change the NOW to DATE in VB, but the code does not run.

How do I change all records that have date and time (using NOW function) and only click that command button to show only the date (mm/dd/yyyy)?

Thanks in advance.

View 1 Replies View Related

Copy A Mdb To Usb

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

Copy Mdb

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

Copy DB

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

How To Copy A Form?

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

Copy And Paste

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

Copy Report

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

Copy From One Record To The Next

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

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 1 Replies View Related

Update Or Copy?

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

Copy Cell Above And Add 1

May 2, 2005

I have a subform in Datasheet view. One field contains numbers. When entering data into the datasheet I wish to copy the number from the cell above and add 1. Can anybody help me with the code to do this?

View 5 Replies View Related

Copy A Form?

Jun 27, 2005

If I have a form based on 1 table and want to create an almost identical form based on the same table, how do I do it?
I need to delete only 5 fields from 1st form and then add 5 different fields.
All fields for both forms would be in the same table upon which they are based.

Russ

View 2 Replies View Related

Copy Record

Aug 5, 2005

I have this form that contains a good number of bound fields. The behaviour I would like to add to this form is, upon the press of a button, a new form would pop open (same form) as a copy of the current. This would make entering in multiple items with very few differing fields much easier.

I don't know a good way to do this. I mean I could list out each control, enter it in a new row in the database, and then open the new form pointing to that record, but that seems ridiculous. That would be like 500 lines of just gathering the data and inserting.

So I decided to cycle through all the controls, pick out the types I need, such as textboxes etc, and then get the value from that and put it in a new entry. So I would end up getting the name of the field in a variable, (named field), but I am unable to extract the value from the form from this string. Something like _ Me. & field & .Value _ really doesn't work. Anyway I can use a variable to get the value of a field?

View 3 Replies View Related

Copy Record

Dec 9, 2005

Hi,
I have a form ('A') for editing new records in table 'T' . I want to be able to copy data (just some fields) from another record to this new record.

This was my plan:
On this form 'A', I made a button "copy another" that opens a form 'B' that should show all the records from tabel 'T'. User select a record and then all the necessary fields will be copied to the new record in form 'A'.

However, the first error starts when I open this form 'B'. I get the errornumber 3211. The err description is (I have to translate because I have a dutch versoin). "The database engine can't lock the table 'T'. Table 'T' is in use at the moment by another user or proces".
How can I make this work? I understand that the table is in use, because form 'A' is using the same table.

greetings
Nelleh

View 3 Replies View Related

Cannot Copy Forms

May 28, 2006

I cannot copy Forms from one db to another db. I can copy everything else, report, queries, tables, etc.
When I "export" the Form, it appears to copy. However, it does not appear in the directory where it should be. If I recopy, it says "its already there and ask to overide the present Form. Still no soap. How can you copy Forms from one db to another? This sucks big time!
Please help if you can.

View 1 Replies View Related

Copy Field

Jul 31, 2006

I have a data entry form with many records. Instead, of retyping the same data. I would like click a button and the data on the top row will copy downward.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved