Solved

Access detail object properties

Posted on 2007-03-23
6
185 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…

706 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

13 Experts available now in Live!

Get 1:1 Help Now