data binding in relational database 
Author Message
 data binding in relational database
hello,
I have two table, Sender and Bank.

In sender i have a field call Bankcode ,that stored the code of bank.
In bank i have a the :code and name of the bank

how can i make a text box to display the bank name? where i made a form to
view the sender informations....

Thank you



Tue, 06 Nov 2001 03:00:00 GMT
 data binding in relational database

I would make a bas module that gets the name of the bank given a code

I'm writing this from memory. Syntax is probably wrong.

Dim db as database
Dim rs as recordset

Public Function GetBankName(code as string) as string
set db = OpenDatabase ("dbname")
set rs = db.OpenRecordset("bank",dbOpenTable)
rs.index = "PrimaryKey"
rs.seek "=", code
If not rs.NoMatch then GetBankName = rs!Desc
db.close
rs.close
set db = nothing
set rs = nothing
End Function

Put in some error handling

Then, in your frm,
Dim BankName as string
 BankName = GetBankName( <sender field for the code)


Quote:
> hello,
> I have two table, Sender and Bank.

> In sender i have a field call Bankcode ,that stored the code of bank.
> In bank i have a the :code and name of the bank

> how can i make a text box to display the bank name? where i made a form to
> view the sender informations....

> Thank you



Tue, 06 Nov 2001 03:00:00 GMT
 data binding in relational database
Try to use query -- "SELECT BankName, Sender.* FROM Sender, Bank WHERE
Bank.code=Sender.bankcode"-- as recordsource
Quote:

>hello,
>I have two table, Sender and Bank.



Fri, 09 Nov 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Data-Bound Vs. Non-Data-Bound Controls

2. Data-Bound Vs. Non-Data-Bound Controls

3. relational databases vs. not-so relational databases

4. Relational Databases vs. NF2 or Nested Relational Databases

5. relational databases vs. not-so relational databases

6. Opening a bound database from a bound database?

7. ?Data bound controls lost binding after filtering

8. ?Data bound controls lost binding after filtering

9. How to bind ADO data bound controls in Visual C++

10. Data designer bound controls seem to lose their binding to the recordset with Requery

11. Bound vs Un-Bound data


 
Powered by phpBB® Forum Software