473,325 Members | 2,342 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,325 software developers and data experts.

Code for passing from form to form

Hi, I already posted this in the Access section but it fits more here

I am having trouble with some forms i am creating for a database.

I have a data entry form at the moment that enters information into one table and a subform within the form that enters information into another table.

The subform takes the primary key, which is an autonumber, from the main form, as the subform puts information in a table which is linked to the table that the main form puts information into.

My problem is that I want to create a second form after this one, which i want to automatically take the primary key autonumber from the previous form.

Does anyone know the visual basic to do this?

Thanks
Jul 5 '07 #1
1 899
muddasirmunir
284 100+
you can take data from any other form by this code

text1.text=from1.text1.text

this code give text1.text in form2 the value = the value of textt1.text in form1



Hi, I already posted this in the Access section but it fits more here

I am having trouble with some forms i am creating for a database.

I have a data entry form at the moment that enters information into one table and a subform within the form that enters information into another table.

The subform takes the primary key, which is an autonumber, from the main form, as the subform puts information in a table which is linked to the table that the main form puts information into.

My problem is that I want to create a second form after this one, which i want to automatically take the primary key autonumber from the previous form.

Does anyone know the visual basic to do this?

Thanks
Oct 17 '07 #2

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

Similar topics

2
by: Gordon Hudson | last post by:
Hello Here is what I am trying to do: Make a hyperlink on a data entry form with its URL built from the values for fields in that entry on the database. So, I would go to record 65785 click...
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: Maria | last post by:
Hello! I am new to Crystal reports an I have problems passing parameters form outside to Crystal report an creating a report with data from more than one table This is the problem: I have to...
4
by: devanoy | last post by:
I have a piece of c# code in the Page_Load function. submitButton.Attributes.Add("onClick", "return checkForm('" + this + "','" + SomeTextBox.Text + "')"); When I click the submitButton, it...
13
by: Woody Splawn | last post by:
From a Winform I am calling the sub routine that follows in a module Public Sub PopulateWithStates(ByVal myform As Contracts, ByVal FieldName As String) Select Case FieldName Case "txtST"...
4
by: Paul | last post by:
Is there any way of making the following code into a function so that I don't have to re-use the same code for all my buttons? I've tried to do this with the code at the bottom of my post but I get...
7
by: AMP | last post by:
Hello, I have this in form1: namespace Pass { public partial class Form1 : Form { public Form2 form2; public Form1() {
0
by: Magnus Bergh | last post by:
I am developing an application for pocketpc and this involvs a but of juggling with different forms. I have an "order entry" type of application. On the main form I have a grid which displays...
0
by: AAaron123 | last post by:
On a Form I have a RichTextBox. I do the call for EM_SETEVENTMASK with ENM_REQUESTRESIZE The user control's WndProc writes to the consol to keep track of any EN_REQUESTRESIZE messages. As...
4
by: John Sheppard | last post by:
Hello there I was wondering if anyone could help me, I am trying to pass a typed dataset to a dialoged child form by reference. I have binding sources sitting on the child form. So to refresh...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.