I am doing a project and I am stuck in a particular form. In that form I have two combobox one is cbosource and another is cbodestination in cbosource in have added three item: [login to view URL] "A", [login to view URL] "B", [login to view URL] "c" and same for cbodestination: cbodestination "A", cbodestination "B", cbodestination "C". Now I have created a database for it in ms access table called "token" in that table I have given three fields : 1)Source
2)Destination 3)Amount. Now the first one is Source: A, Destination: B, Amount: 10. Next is Source: A, Destination: C, Amount: 15. Next is Source: B, Destination: A, Amount: 10. Next is Source: B, Destination: C, Amount: 15. Next is Source: C, Destination: A, Amount: 10. Next is Source: C, Destination: B, Amount: 15. So what I am trying to do is I want to link the items of combo boxes with the field items A B C and I want to display the amount in a text box i.e txtamt
.So please anyone can help me I have tried a code which I have shown below but when I do it it will change the data of the database but what I want is to display the amount as per the selection of the comboboxes.
Dim cn as new [login to view URL]
Dim rs as new [login to view URL]
private sub cmdamt_click()
if cbosource.text=rs!Source and cbodestination.text=rs!Destination then
'Here when you execute it will change the values of the database but it wont display the amount.... So please anyone help me tmrw somehow I need submit my project so please anyone help me.
It is an Visual Basic 6 platform with ms access database.