Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Prefill fields from a database

Avatar

Level 7

I have a form with a OLEDB connection and I have bound certain fields to it (name, address etc.). What I want to do is allow the user to put in their client number and then the form fills in the other information (name, address etc) from the database. How do I do this (in formcalc if possible)? Thanks!

5 Replies

Avatar

Level 7

OK so I have watched the video but I have multiple data connections and I am not sure how to link them together to get the one record? (ie. the client number is in one table of the database and then in a seperate table ( so new data connection) is the address and in a seperate table are other details I need to access).

Avatar

Level 10

A form can support one database connection, only. You will have to create a SQL statement to join the tables containing the client number and the address.

Steve

Avatar

Level 7

and how do I do that? That is the bit I need to know.

Avatar

Level 7

So I have now worked out the SQL bit and have a OLEDB connection with an SQL query which links the tables. It gives me the correct record for one client but what I now don't know is the code to put into the form so you can enter a client number and it will bring up that record. I have a client number numeric field and I assume the code goes in the exit event but can someone please help me with the actual code. Thanks!