|
-
Jul 18th, 2000, 12:41 PM
#1
Thread Starter
Junior Member
Hello all,
I've got a bit of a problem here.
I'll start at the beginning. I'm writing a database program for keeping track of contact lens orders. The client needs to be able to search through a database with two tables in a parent/child manner. PatientInfo is the main table, containing information like address, DOB,
social security number, etc. The OrderInfo table contains the specific prescription information of each order for a particular patient. This is all not so tough, right? I could simply create a master/detail form to do it nicely. There's one problem: The client REFUSES to use a datagrid to enter the OrderInfo information.
My question: Is there any way to use standard controls (textboxes, combos etc.) to manage the detail/child information?
I sincerely appreciate any help anyone can offer.
I'm running out of time on this one. ^_^
-Mike
[email protected]
Full Contact Coding-
The greatest way of life!
-
Jul 18th, 2000, 01:46 PM
#2
Doing this kind of thing without the grid is code-intensive, but I actually prefer doing it this way, because I absolutely detest bound controls.
It works something like this:
Load the detail data related to the current master record into a dynamic array (an array whose bounds will vary depending upon the number of detail records are associated with the current master record). This array would be an array of a "user-defined type" (structure) containing the related fields. On your form, you have control arrays for each detail field (using textboxes, combos, etc.), arranged into "rows". Along side the rows, you have a vertical scroll bar with the min and max values set to the lower and upper bounds of your internal array. As the scroll bar moves, its value property will change, and you use that value to shuffle data back and forth between your internal array and the control arrays on your form. Before you move on to another record, save the detail data from your internal array to the database.
Like I said, this method is code-intensive, so take that for what it's worth. I hope this gives you some ideas. Good luck.
"It's cold gin time again ..."
Check out my website here.
-
Jul 18th, 2000, 01:48 PM
#3
Hyperactive Member
For data entry or to display the info? Sure, either way would work....The easiest way, if you're using SQLServer, you could combine the queries of the 2 tables into one stored procedure, and then it would be easier to bind the controls to your datasource.
I kind of like using the Data Environment, but you could also programmatically create the command and recordset objects.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|