Dear All,
I,m doing a invoice project and in it i want to create both salesInvoice & purchase order
my Purchaseinvoice table contains following fields
1.InvoiceNo int primary key
2.Pdate datetime
3.Supplier Id varchar(10)(Thi s sup id should come from supplier table)
4.SupName(20)
5.ItemNo varchar(10)(Thi s following fields should from Product table)
6.Descrption varchar(20)
7.Purprice float
8.Qty int
my Product table contains followings fields
ItemNo varchar(10)
1.N1001
2.C909
3.F600
Descrption varchar(20)
Fan
Chair
Table
Supid int
1001
1009
1010
Purprice float
65.0
47.0
20.0
SalPrice float
75.0
55.0
30.0
QtyIn int
100
300
200
QtySold int
0
0
0
so the invoice form i created like this
Invoice No (TextBox) Pdate(TextBox)
SupId (DataCombo) SupName(TextBox )
''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' ''''''''''''''' '''''''''''''''
ItemNo Descrp Price Qty Gross
txtItemNo1.text txtdes1.text txtprice1.text txtqty1.text txtgross1.text
txtItemNo2.text txtdes2.text txtprice2.text txtqty2.text txtgross2.text
txtItemNo3.text txtdes3.text txtprice3.text txtqty3.text txtgross3.text
This is my form and i need to retrive the SupName from supplier table when i choose the datacombo SupId(i already binded) and i when i type and click the ItemNo in txtItemNo1.Text then i want to come all the description,Qty ,PurPrice to that corresponding itemno(i have 10 itemno with descrp,qty,pric e in the table)
from the Product table, so when i type the ItemNo in txtItemNo2.text the another
ItemNo will come it same for all txtbox
so i write the following coding in txtItemNo1.Clic k event
dim a as integer, dim n as string
a = 0
n = Val(txtItem1.Te xt)
adoproduct.Reco rdset.MoveFirst
Do While Not adoproduct.Reco rdset.EOF
'Do While Not EOF
'If adosupplier.Rec ordset.Fields(" SupId") = Val(n) Then
If adoproduct.Reco rdset.Fields("I temNo") = Val(n) Then
txtDescrp1.Text = adoproduct.Reco rdset.Fields("D escrp")
txtPrice1.Text = adoproduct.Reco rdset.Fields("P urprice")
txtQty1.Text = adoproduct.Reco rdset.Fields("Q tyIn")
a = 1
End If
adoproduct.Reco rdset.MoveNext
Loop
If a = 0 Then
MsgBox "Item No Mismatch"
End If
adoproduct.Refr esh
it,s not working and showed me the error msg
when i run my form it showed me the error msg
"Run time error 2147217842(8004 0e4e)
Opreation was canceled
and when i clicked the debug it showed me the only the 2 fields of the Product table
ItemNo's N1001-Purprice 65,QtyIn 100 but Description column in sql automattically deleted from the table, and if i type the ItemNoC909 in this txtbox with the same error msg it showed me the same value (65,100) if type the ItemNo in 2nd txtItem2.Text it showed me the error
but if i specify the itemNo as C909 in txtItem1.Text it didn't show me other column and directly goes to the EndIf statement and showed me the "Invalid ItemNo"Msgbox
so i take some datas from Product and insert in the new Pinvoice table
so whats the real problem and there is anything wrong in my coding plz tell me how can i solve this problem and instead of textbox how can i use datacombo to retrive the fields and what i should i do to solve this issue
plz i need ur help
0 1046 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Guilherme Pinto |
last post by:
Hello.
I am reading the book written by Bjarne Stroustrup called " The
C++ Programming Language - Special Edition" and
had a doubt which a think is really important to distinguish between
the main features of modules, namespaces, and
User-Defined types. The text above was copied from page 31.
--------------------------------------------------------
|
by: ambika |
last post by:
Hello,
Am not very good with pointers in C,but I have a small doubt about
the way these pointers work..
We all know that in an array say x,x is gonna point to the first
element in that array(i.e)it will have the address of the first
element.In the the program below am not able to increment the value
stored in x,which is the address of the first element.Why am I not
able to do that?Afterall 1 is also a hexadecimal number then...
|
by: dam_fool_2003 |
last post by:
I am just a beginner in tree data – struct. I have this little doubt.
Left node ‘weights' lesser than the right one. I have seen, so far it
is algorithm implementations. But why not vice-versa that is right
node ‘weights' lesser than the left one? Why the trees are implemented
in that way? Can any body clarify?
Thanks in advance
|
by: maadhuu |
last post by:
firstly, i am thankful to all those who answered the 1st set of doubts. And
i am not yet enlightened to that extent , coz ' i keep getting doubts.
is the following defined in the language ??
int main()
{
int a = 1;
int *p = &a;
p++;
printf("%d",*p);
|
by: SMG |
last post by:
Hi All,
It might be a silly doubt, but it is a doubt....
I am using form authentication for my website, now my web application is
gonna be deployed on two web servers with Load Balancing software in place.
Now if I login at one place, can I be treated as logged in at other place
also or it will again give me a login screen.
Form Authentication : Is it internally uses cookies?
| |
by: muttaa |
last post by:
Hello all,
My doubt is going to be so primitive that i ask you all to forgive me
beforehand....
Here's the code snippet:
int main()
{
int x=5;
|
by: Bob Nelson |
last post by:
I don't remember seeing the term ``doubt'' used much in c.l.c. back in the
90's. When did this word become nearly synonymous with ``question'' or
``query'' and does it have static duration?
|
by: ivan |
last post by:
hi all,
if I have:
if(A && B || C)
which operation gets executed first?
If I remeber well should be &&, am I correct?
thanks
|
by: Paulo |
last post by:
Hi, I have a RadioButtonList and I need to do some verifications on a
"OnChange" event on client... because on classic asp/html I just add a
"onChange" event on <input type="radio" onChange="">, etc...
How can it be done on RadioButtonList server component on asp.net 2.0 C# VS
2005 ?
Thanks!
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |