Continuous subform but not

littleme

Registered User.
Local time
Today, 15:46
Joined
Aug 15, 2008
Messages
16
Hello again...

Im fiddled around with my database structure and landed back where I started.(thank you magicman)

Work for a architects office and am trying to set up database to help describe all the rooms in a project, in terms of materials, equipment etc.

there are 4 re-occuring sturcture types (wall, ceiling, trim, floor) in each room. Each on is described using color, AMA, paint, material.

But am having some problems with the form setup. I wouldnt have any problems if I could use a continuous subform, with comboboxes for the structure type, dont want user to be able to miss filling in info for a sturcture type, or describing same structure type twice.

Really just want the subform to be table where the structure types are pre-filled in.

Attatching screen dump of relationships and form that I have, as well as a what I would need.

What do I have to change to make it work? Grateful for any ideas...
 

Attachments

  • what I have_1.JPG
    what I have_1.JPG
    52 KB · Views: 174
  • what I have_2.JPG
    what I have_2.JPG
    78.4 KB · Views: 147
  • what I would like.doc
    what I would like.doc
    31 KB · Views: 138
Create a New Table with the following Structure and save it with the Name Category. Enter the Data as given below:

ID Desc
1 Wall
2 Ceiling
3 Trim
4 Floor

Write the following Code on the Module of the Sub-Form. Change the Field Name correctly replacing what is given in the sample code.

Private Sub Form_Current()
Dim i, rst As Recordset, struct
If Me.NewRecord Then
Set rst = Me.RecordsetClone
i = rst.RecordCount
struct = DLookup("Desc", "Category", "id = " & i + 1)
Me![Structure] = struct
rst.Close
End If
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom