Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controling user interface 1

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
I have a customer, who has hit me with an impossible requirement. Ive now been tld to make it work as close to the brief as possible.

The requirement; One of the forms has a sub form. This sub form contains some text, and a text box for each record in the query associated to the sub form. 2 of these results that can appear in the sub form now need additional text boxes. Ive proved to them that they either have all the text boxes displayed for all the records in the sub form, or for none.

The compromise has been to put another bit on the main form, that contains the required text boxes. If the subform contains records 10 or 13, then I am to make the textboxes visible so that they can do additional data entry.

so, whats the best way of seeing if records 10 and / or 13 have been pulled into the subform, so on Form_Load I can toggle the display of the additional text boxes on the main form?

K
 
What does record 10 or 13 mean? Is it a record with a field containing the value 10 or 13? If so, you can check the RecordsetClone of the subform.
 
Hi Remou.

First of all,I am an access novice, so please dont be upset if I aks lots of questions that seem obvious to you.

10 or 13 are id's of the specific records.

Please can you expand on how I would test the recordsetClone?
 
Add this code to the current event of the main form changing the names to suit your application:

Code:
'Requires reference to Microsoft DAO 3.x Object Library
Dim rs As DAO.Recordset
Set rs = Me.[i]SubformControlName[/i].Form.RecordsetClone
rs.FindFirst "ID=10 Or ID=13"
If rs.NoMatch Then
    'Not found
    Me.[i]ExtraControlName[/i].Visible = False
Else
    'Found
    'Make extra controls visible
    Me.[i]ExtraControlName[/i].Visible = True
End If

If it suits, you will also need to add it to the AfterUpdate event of the subform.
 
Thanks.

Now, the next question from that will be whats the best way of updating the data once they enter it?

I have a query bound to the main form. I am going to create additional columns in the table that query looks at to hold the new data. So Im planning on just binding these textboxes to those columns via the query. Can you see an issue with this?

Thanks again

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top