Solved

Access detail object properties

Posted on 2007-03-23
6
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

734 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