473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Passing data from one record to a control in a new record

I have a subform that I would like to pass the contents of one control to a new record. I tried:

Expand|Select|Wrap|Line Numbers
  1. Private Sub form_Afterupdate()
  2.      Dim ctl as Control
  3.      For Each ctl in Screen.ActiveForm.Controls
  4.           If ctl.Tag = "Carry" Then
  5.                Ctl.DefaultValue = """" & ctl.Value & """"
  6.           End If
  7.      Next
  8. End sub
I then set the correct control's tab to "carry." But, it doesn't work.

Any ideas??
Dec 26 '14 #1
4 990
Seth Schrock
2,965 Expert 2GB
I'm not exactly sure what you are trying to do and what the situation is, but my guess is that your code isn't getting triggered. The form's After_Update event is run after the a record is updated, not after a property of a control is changed. My suggestion would be to create a button and put your code in the On_Click event and see what that does.
Dec 27 '14 #2
That did it! Thank you.
Dec 28 '14 #3
Thank you! That accomplished what I wanted.
Dec 28 '14 #4
Seth Schrock
2,965 Expert 2GB
Glad to be able to help. Good luck on your project.
Dec 28 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rob Oliver | last post by:
Hi, I've seen a walkthrough for passing data from a setup project to a custom action (an application) with an InstallClass. I am curious though--can the data also be intercepted by a custom...
1
by: LarryH | last post by:
I am new to Access and have one small problem I can't seem to solve. I have a database with multiple order records for people. Each person has a unique ID, and is on the datbase multiple times,...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
1
by: Hans [DiaGraphIT] | last post by:
Hi! I have problem with passing data to custom action. I don't know what wrong I'm doing. I'm trying to follow the steps in the walkthrough: "Passing Data to a Custom Action" ...
9
by: C Newby | last post by:
I have a data grid control taht contains a data bound coulmn called "Type". Depending on the value of "Type" I want to display a corresponding image in the rendered table cell. So, if the value of...
3
by: Marc Castrechini | last post by:
First off this is a great reference for passing data between the Data Access and Business Layers:...
0
by: Dave Cullen | last post by:
I have a dll written in VC6 that I need to send arguments to from a call in VB.NET. I'm having trouble passing data arguments between them. So far I've only tried passing strings, and all I get...
10
by: Mark Denardo | last post by:
Hi, I have multi-threaded application that requires one particular thread (Non-Form based) to receive data from other threads. I know how to pass control to Form Threads, but I believe there's no...
3
by: Lonewolf | last post by:
Hi all, I'm having difficulties passing data back to managed class from my native class when the data is generated from within a native thread in the native class itself. I will give the following...
4
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.