|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SubForm questions
I have two questions involving the use of a subform.
The background: I have a form with all the detail about a company and licensing information. At the bottom of the form I have a subform that lists previous licenses (if a new feature or product is purchased a new license is issued) Question 1 : Is there an easy way to be able to select a record from the subform and display it in the top section (to be able to edit it and say it is no longer valid)? Question 2 : Is there a way to be able to change the color of the lines of the subform where the cancelled checkbox is on? The downside to this - I am unfortunately using Access 97 to do this. |
|
#2
|
|||
|
|||
|
What I would do, instead of using a sub form (no true child-parent relationship between forms), is use a list box to display your other licenses that the customer has. The listbox would be tied directly to the table and when you add a record you refresch your list box to display the new record and when you want to edit and exisiting license you double click on it and bring the data into the form for editing.
OR Keep track of the type of product the license is for and when a new license is issued for that product, automatically check the old license as cancalled in code durng the process and issueing the new license. If you use a list box then you can't change the color of the cancelled license and I haven't had and need to do what you've asked for on a line by line case with details, maybe someone else has. S- |
|
#3
|
|||
|
|||
|
Okay. I have my list box set the way I want. It is displaying the license history records that already exist for a given company.
I now am having trouble getting the select record thing to work. When a person double-clicks on one of the records from the history listing I want to display that record. |
|
#4
|
|||
|
|||
|
Variable1= ListBoxName.Column(0)
Variable2= ListBoxName.Column(3) Variable3= ListBoxName.Column(4) Variable4= ListBoxName.Column(8) The use the variables you need from the listbox and query you table and populate the fields on the form or populate your text boxes directly from the listbox (if all info is present) S- |
|
#5
|
|||
|
|||
|
That would get the field filled but would that actually bring up that record? Seems to me that this would only create a copy of the record I was trying to bring up.
|
|
#6
|
|||
|
|||
|
This depends on whether you are using Bound or UnBounded forms. If you want to use a bound form then pass the recordset to the source control on the form. IF you are using unbounded forms, then yes, you do pass a copy to the fields which you will later grab and pass back to the table as an update.
S- |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > SubForm questions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|