473,320 Members | 1,958 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,320 software developers and data experts.

Issue saving same ID on two tables from two different forms

I need to print an invoice that calls two tables: Guest table and Sales table...what i do in the actual program is enter guest info in one form and on the other form i create invoices in sales. What i need to do is store a guest ID that is the same on both tables. Guest table is already producing a guestID automatically while Sales table is generation one called SalesID, both are different...right now i have a GuestID also in Sales but it is null...i really would like to know how i can make that guestID in sales be the same as the guest tables guestID so that i can make a query to add the totals together if it's the same ID chosen. Any assistance will be greatly appreciated.

I'm using Visual Studio 2005, c# code, MS SQL server 2005

Regards,
George
Dec 4 '07 #1
2 969
vanc
211 Expert 100+
I need to print an invoice that calls two tables: Guest table and Sales table...what i do in the actual program is enter guest info in one form and on the other form i create invoices in sales. What i need to do is store a guest ID that is the same on both tables. Guest table is already producing a guestID automatically while Sales table is generation one called SalesID, both are different...right now i have a GuestID also in Sales but it is null...i really would like to know how i can make that guestID in sales be the same as the guest tables guestID so that i can make a query to add the totals together if it's the same ID chosen. Any assistance will be greatly appreciated.

I'm using Visual Studio 2005, c# code, MS SQL server 2005

Regards,
George
Then you should make a query to get the just inserted GuestID and then use it in Sales table.
cheers.
Dec 5 '07 #2
Then you should make a query to get the just inserted GuestID and then use it in Sales table.
cheers.
It's that simple. I guess I was making the wrong question...thanks though
Dec 5 '07 #3

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

Similar topics

0
by: William Morris | last post by:
We have a number of clients using a web application. Each client sees a slightly different version of, say, a contact input page. As a simple example, Client #1 sees demographics, plus religious...
4
by: Frustrated Newbe | last post by:
Hi, I would appreciate your opinion on the following issue. Suppose there is a windows (not web!) application that uses the data stored on an SQL server. There can be more than one concurrent...
4
by: wayne dooley | last post by:
This should be easy. I have 2 tables - CUST and SUBS, which have a 1 to many relationship. I created a form to show fields from CUST and a subform to show those in SUBS. The 2 tables are related...
7
by: Paolo | last post by:
I know I should not be doing this, but I find it very useful. I have a database in Access which stores data for a small company. Sometimes we need to add similar information to different tables....
3
by: ironcito | last post by:
Hello all, I'm not an Access expert, so I'll try to explain the problem the best I can, and please try to answer so that a layman can understand it =) I have a database with several tables,...
13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
3
by: Nerrad | last post by:
hi guys, i have a project on my hand and what i'm told to do is to create a log-in feature using tables and forms. Da question is that is there any way to allow different users different access...
11
by: =?Utf-8?B?R29rdWw=?= | last post by:
I am struck up with a problem and want anyone here to help me out. I am a beginner in .NET trying to learng DataBinding concepts. I have binded 4 text boxes with a dataset but when I say...
1
by: romcab | last post by:
Hi guys, I would like to ask your help about saving in ado.net. I was able to update it only on the display but when I check the database, it is not updated. I paste below my code and hopefully...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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)...
0
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...
0
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...

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.