Solved

Access detail object properties

Posted on 2007-03-23
6
188 Views
Last Modified: 2013-11-28
Hello,

     I'm trying to understand/ figureout how to display (for edit) multiple subsets of data. For example: a subform within a subform. Access 03 will only allow the developer to create one subform deep, however, I need a little more functionality.

     Another related issue: On a subform (in the detail body (Continious form)),  I need a command button (listed in every detail item) to either be visible or invisible depending upon a return from a query. Is there is way to hide and show select command buttons for each detail item. (Example: Continious form with an employee listed in each detail. If notes exist for the employee (in a separate table) then the 'show notes' command button is visible/ enabled etc.. Again, the problem occurs when a particular object's visible property is set to false, ALL of the objects in every detail item have visible properties set to false. )
0
Comment
Question by:MichaelSwitzer
  • 2
  • 2
6 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 500 total points
ID: 18780627
in Access 2003 you can create multiple levels of subforms ... what is the specific problem you are having? What kind of form views are you using for each level?

For the button problem I would create a calulated field in the query that says "Show Notes" if there is anything in the Notes field


IIF(Len([Notes] & "")>0, "Shoe Notes", "") As ShowMe

then bind that field to a textbox on your form. You can chnage the textbox to be raised and change background and forecground colors so it looks almost like a button and in the click event of that control you test if there is anything in the field before openeing your notes detail form

Private Sub txtShowNotes_Click()
    If Len(Me.txtAShowNotes &  vbNullString) > 0 Then
        DoCmd.OpenForm "frmNotes"
    End If
End Sub
0
 
LVL 1

Author Comment

by:MichaelSwitzer
ID: 18780780
Access won't allow a form to be continious if its subform is viewed continiously. Is there a way to 'get around' this limitation?
0
 
LVL 1

Author Comment

by:MichaelSwitzer
ID: 18780861
More specifically, there exists a Main form with form view, a subform with continious view, and i would like for a second subform (within the first) with a continious view.

To do what you proposed, I would need to create a query (this program's front end written in Access and back end in MSSQL05) that checks a related table and sets each field's value to "Show Note" or (or what have you) and set a text box control source to the qry's filed name holding the 'Show Note' string.
Is this what you mean?

(ps. I liked your Nz expression.)
0
 
LVL 39

Expert Comment

by:stevbe
ID: 18780989
part 2: in essence, yes.

Can you swith from continuous form to datasheet? they can have subdatasheets.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now