Populate multiple control texts via recordset

Straylight

New member
Local time
Yesterday, 18:24
Joined
Feb 21, 2008
Messages
7
I have the following code...

Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim rs As DAO.Recordset
Dim x As Integer

Set db = CurrentDb
Set qdf = db.QueryDefs("CNoteFullPage")
strSQL = "Select * FROM CNotes WHERE CID = " & Form_PacketClients!RecordID & " ORDER BY NDate DESC, NTime DESC"
qdf.SQL = strSQL
Set rs = qdf.OpenRecordset

rs.MoveFirst

For x = 1 To 12
Form_C_Notes_Page_View.NDate(x) = rs.Fields("Ndate")
Next x

The form has 12 different groups, Ndate1, Ndate2, Ndate3 etc, along with various other control text boxes.

The above does not work Ndate1 by itself works, Ndate(x) does not. Seems simple enough but I am having a problem finding a solution any ideas?
 
First, let's simplify that so that it isn't so obviously pasted out of a help document:

Code:
Dim rs As DAO.Recordset
Dim x As Integer

Set rs = CurrentDb.Open "Select * FROM CNotes WHERE CID = " & Form_PacketClients!RecordID & " ORDER BY NDate DESC, NTime DESC"
rs.MoveFirst

For x = 1 To 12
	Form_C_Notes_Page_View.NDate(x) = rs.Fields("Ndate")
Next x

Second, you cannot have a control array in Access. You may have 12 controls named NDate1, NDate2, ... NDate12. However, you're trying to access it as an array, and while that's fine as an VB structure where control arrays are allowed, they are not allowed in Access.

A simpler way to do this is to load the value into a table and set the control source of each NDate appropriately. For example, set NDate1 on your form to have a Control Source of NDate1 in your query, NDate2 to the same in the query, and so on. Then, you just refresh the query.
 
Stray,

I don't know the structure of your Query --> Select * From CNotes,
but I'll assume it's a repeating field: NDate1, NDate2, ...

Code:
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim rs As DAO.Recordset
Dim x As Integer

Set db = CurrentDb
Set qdf = db.QueryDefs("CNoteFullPage")
strSQL = "Select * FROM CNotes WHERE CID = " & Form_PacketClients!RecordID & " ORDER BY NDate DESC, NTime DESC"
qdf.SQL = strSQL
Set rs = qdf.OpenRecordset

For x = 1 To 12
  Me.Controls("NDate" & Cstr(x)) = rs.Fields("Ndate" & CStr(x))
  Next x

btw,

Why aren't you using bound forms?

Wayne
 
Thank you for the responses. I had to go around this and do the code very.... not elegantly.. I will post it just so you can see what I was doing. Basically I have a form with 16 identical groups of unbound controls, they are basically client notes. Normally they are viewable on the front end 1 note at a time I was creating a form so you can view them MANY at a time and flip through pages of 16 at a time. I was hoping to do what I did below in a nice tight for/next statement. But out of impatience solved it the barbaric way....

The sub-routine is included along with the subs that call it.

And I did not quite get it out of a help file, the format I used was just the way I was taught. Which I suppose probably in some way shape or form... came from a help file...

Anyways the code... it is not pretty! But I am relatively rookie. But again thanks alot for the input folks.


Code:
Option Compare Database
Private i As Integer


Private Sub Form_Load()
i = 0
PrintSheet
End Sub

Private Sub PrintSheet()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim rs As DAO.Recordset
Dim x As Integer
Dim Str As String
Set db = CurrentDb
Set qdf = db.QueryDefs("CNoteFullPage")
strSQL = "Select * FROM CNotes WHERE CID = " & Form_PacketClients!RecordID & " ORDER BY NDate DESC, NTime DESC"
qdf.SQL = strSQL
Set rs = qdf.OpenRecordset

rs.Move (i)

If rs.RecordCount > i + 0 Then
Form_C_Notes_Page_View.NDate1 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime1 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep1 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType1 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote1 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note1 = True
Else
Flagged_Note1 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate1 = ""
Form_C_Notes_Page_View.NTime1 = ""
Form_C_Notes_Page_View.NRep1 = ""
Form_C_Notes_Page_View.NType1 = ""
Form_C_Notes_Page_View.NNote1 = ""
End If

If rs.RecordCount > i + 1 Then
Form_C_Notes_Page_View.NDate2 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime2 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep2 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType2 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote2 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
    Flagged_Note2 = True
    Else
Flagged_Note2 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate2 = ""
Form_C_Notes_Page_View.NTime2 = ""
Form_C_Notes_Page_View.NRep2 = ""
Form_C_Notes_Page_View.NType2 = ""
Form_C_Notes_Page_View.NNote2 = ""
End If

If rs.RecordCount > i + 2 Then
Form_C_Notes_Page_View.NDate3 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime3 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep3 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType3 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote3 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note3 = True
Else
Flagged_Note3 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate3 = ""
Form_C_Notes_Page_View.NTime3 = ""
Form_C_Notes_Page_View.NRep3 = ""
Form_C_Notes_Page_View.NType3 = ""
Form_C_Notes_Page_View.NNote3 = ""
End If

If rs.RecordCount > i + 3 Then
Form_C_Notes_Page_View.NDate4 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime4 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep4 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType4 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote4 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note4 = True
Else
Flagged_Note4 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate4 = ""
Form_C_Notes_Page_View.NTime4 = ""
Form_C_Notes_Page_View.NRep4 = ""
Form_C_Notes_Page_View.NType4 = ""
Form_C_Notes_Page_View.NNote4 = ""
End If

If rs.RecordCount > i + 4 Then
Form_C_Notes_Page_View.NDate5 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime5 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep5 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType5 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote5 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note5 = True
Else
Flagged_Note5 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate5 = ""
Form_C_Notes_Page_View.NTime5 = ""
Form_C_Notes_Page_View.NRep5 = ""
Form_C_Notes_Page_View.NType5 = ""
Form_C_Notes_Page_View.NNote5 = ""
End If

If rs.RecordCount > i + 5 Then
Form_C_Notes_Page_View.NDate6 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime6 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep6 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType6 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote6 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note6 = True
Else
Flagged_Note6 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate6 = ""
Form_C_Notes_Page_View.NTime6 = ""
Form_C_Notes_Page_View.NRep6 = ""
Form_C_Notes_Page_View.NType6 = ""
Form_C_Notes_Page_View.NNote6 = ""
End If

If rs.RecordCount > i + 6 Then
Form_C_Notes_Page_View.NDate7 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime7 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep7 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType7 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote7 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note7 = True
Else
Flagged_Note7 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate7 = ""
Form_C_Notes_Page_View.NTime7 = ""
Form_C_Notes_Page_View.NRep7 = ""
Form_C_Notes_Page_View.NType7 = ""
Form_C_Notes_Page_View.NNote7 = ""
End If

If rs.RecordCount > i + 7 Then
Form_C_Notes_Page_View.NDate8 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime8 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep8 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType8 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote8 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note8 = True
Else
Flagged_Note8 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate8 = ""
Form_C_Notes_Page_View.NTime8 = ""
Form_C_Notes_Page_View.NRep8 = ""
Form_C_Notes_Page_View.NType8 = ""
Form_C_Notes_Page_View.NNote8 = ""
End If

If rs.RecordCount > i + 8 Then
Form_C_Notes_Page_View.NDate9 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime9 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep9 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType9 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote9 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note9 = True
Else
Flagged_Note9 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate9 = ""
Form_C_Notes_Page_View.NTime9 = ""
Form_C_Notes_Page_View.NRep9 = ""
Form_C_Notes_Page_View.NType9 = ""
Form_C_Notes_Page_View.NNote9 = ""
End If

If rs.RecordCount > i + 9 Then
Form_C_Notes_Page_View.NDate10 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime10 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep10 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType10 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote10 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note10 = True
Else
Flagged_Note10 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate10 = ""
Form_C_Notes_Page_View.NTime10 = ""
Form_C_Notes_Page_View.NRep10 = ""
Form_C_Notes_Page_View.NType10 = ""
Form_C_Notes_Page_View.NNote10 = ""
End If

If rs.RecordCount > i + 10 Then
Form_C_Notes_Page_View.NDate11 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime11 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep11 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType11 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote11 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note11 = True
Else
Flagged_Note11 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate11 = ""
Form_C_Notes_Page_View.NTime11 = ""
Form_C_Notes_Page_View.NRep11 = ""
Form_C_Notes_Page_View.NType11 = ""
Form_C_Notes_Page_View.NNote11 = ""
End If

If rs.RecordCount > i + 11 Then
Form_C_Notes_Page_View.NDate12 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime12 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep12 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType12 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote12 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note12 = True
Else
Flagged_Note12 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate12 = ""
Form_C_Notes_Page_View.NTime12 = ""
Form_C_Notes_Page_View.NRep12 = ""
Form_C_Notes_Page_View.NType12 = ""
Form_C_Notes_Page_View.NNote12 = ""
End If

If rs.RecordCount > i + 12 Then
Form_C_Notes_Page_View.NDate13 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime13 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep13 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType13 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote13 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note13 = True
Else
Flagged_Note13 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate13 = ""
Form_C_Notes_Page_View.NTime13 = ""
Form_C_Notes_Page_View.NRep13 = ""
Form_C_Notes_Page_View.NType13 = ""
Form_C_Notes_Page_View.NNote13 = ""
End If

If rs.RecordCount > i + 13 Then
Form_C_Notes_Page_View.NDate14 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime14 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep14 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType14 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote14 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note14 = True
Else
Flagged_Note14 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate14 = ""
Form_C_Notes_Page_View.NTime14 = ""
Form_C_Notes_Page_View.NRep14 = ""
Form_C_Notes_Page_View.NType14 = ""
Form_C_Notes_Page_View.NNote14 = ""
End If

If rs.RecordCount > i + 14 Then
Form_C_Notes_Page_View.NDate15 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime15 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep15 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType15 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote15 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note15 = True
Else
Flagged_Note15 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate15 = ""
Form_C_Notes_Page_View.NTime15 = ""
Form_C_Notes_Page_View.NRep15 = ""
Form_C_Notes_Page_View.NType15 = ""
Form_C_Notes_Page_View.NNote15 = ""
End If

If rs.RecordCount > i + 15 Then
Form_C_Notes_Page_View.NDate16 = rs.Fields("Ndate")
Form_C_Notes_Page_View.NTime16 = rs.Fields("NTime")
Form_C_Notes_Page_View.NRep16 = rs.Fields("NRep")
Form_C_Notes_Page_View.NType16 = rs.Fields("NType")
Form_C_Notes_Page_View.NNote16 = rs.Fields("NNote")
If rs.Fields("Note_Flagged") = "TRUE" Then
Flagged_Note16 = True
Else
Flagged_Note16 = False
End If
rs.MoveNext
Else
Form_C_Notes_Page_View.NDate16 = ""
Form_C_Notes_Page_View.NTime16 = ""
Form_C_Notes_Page_View.NRep16 = ""
Form_C_Notes_Page_View.NType16 = ""
Form_C_Notes_Page_View.NNote16 = ""
End If

End Sub


Private Sub ScrollLeft_Click()
If i >= 16 Then
i = i - 16
PrintSheet
End If
End Sub

Private Sub ScrollRight_Click()
i = i + 16
PrintSheet
End Sub
 
Stray,

You can accomplish the same thing, WAY WAY easier with bound forms!

Basically, bind your table of notes to a datasheet or continuous form.

Use the form's KeyPress event to preview key strokes:
PgDn - Advance 16 records
PgUp - Retreat 16 records.

You can just vary the amount of "DoCMd.GoToRecord ,,acNextRecord" commands that
you loop through.

Just an idea, you really want to take advantage of bound forms when you can.

Wayne
 
Thank you a ton, very useful and defintely something I am going to keep in mind next time I have such a problem.
 
Not only does the word normalization scream, I think it aches and begs and says, "Hey, look at me!"
 
Not only does the word normalization scream, I think it aches and begs and says, "Hey, look at me!"

I understood his point and read a very good article for a amateur programmer like myself on the topic of normalization. Being antagonistic like this, is unnecessary, and unappretiated.

The final, much prettier code thanks to the suggestions in this thread...
You can see the page flips are much easier to handle and the subroutine is not as ridiculous now.

Code:
Option Compare Database
Private i As Integer


Private Sub GoToFirstPage_Click()
i = 0
PrintSheet
Me.RecordLabel.Caption = "Showing Record " & (i + 1) & " to " & (i + 16)
End Sub

Private Sub Form_Load()
i = 0
PrintSheet
Me.RecordLabel.Caption = "Showing Record " & (i + 1) & " to " & (i + 16)
End Sub

Private Sub PrintSheet()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim rs As DAO.Recordset
Dim x As Integer
Set db = CurrentDb
Set qdf = db.QueryDefs("CNoteFullPage")
strSQL = "Select * FROM CNotes WHERE CID = " & Nz(Form_PacketClients!RecordID, 0) & " ORDER BY NDate DESC, NTime DESC"
qdf.SQL = strSQL
Set rs = qdf.OpenRecordset

rs.Move (i)

For x = 1 To 16
    If rs.RecordCount > i + (x - 1) Then
    Me.Controls("Ndate" & x) = rs.Fields("Ndate")
    Me.Controls("NTime" & x) = rs.Fields("NTime")
    Me.Controls("NRep" & x) = rs.Fields("NRep")
    Me.Controls("NType" & x) = rs.Fields("NType")
    Me.Controls("NNote" & x) = rs.Fields("NNote")
    If rs.Fields("Note_Flagged") = "TRUE" Then
           Me.Controls("Flagged_Note" & x) = True
           Me.Controls("Ndate" & x).BorderColor = vbRed
           Me.Controls("NTime" & x).BorderColor = vbRed
           Me.Controls("NRep" & x).BorderColor = vbRed
           Me.Controls("NType" & x).BorderColor = vbRed
           Me.Controls("NNote" & x).BorderColor = vbRed
    Else
           Me.Controls("Flagged_Note" & x) = False
           Me.Controls("Ndate" & x).BorderColor = vbBlue
           Me.Controls("NTime" & x).BorderColor = vbBlue
           Me.Controls("NRep" & x).BorderColor = vbBlue
           Me.Controls("NType" & x).BorderColor = vbBlue
           Me.Controls("NNote" & x).BorderColor = vbBlue
     End If
    rs.MoveNext
  Else
    Me.Controls("Ndate" & x) = ""
    Me.Controls("NTime" & x) = ""
    Me.Controls("NRep" & x) = ""
    Me.Controls("NType" & x) = ""
    Me.Controls("NNote" & x) = ""
    End If
Next x

End Sub



Private Sub GoToLastPage_Click()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim rs As DAO.Recordset
Dim x As Integer
Set db = CurrentDb
Set qdf = db.QueryDefs("CNoteFullPage")
strSQL = "Select * FROM CNotes WHERE CID = " & Nz(Form_PacketClients!RecordID, 0) & " ORDER BY NDate DESC, NTime DESC"
qdf.SQL = strSQL
Set rs = qdf.OpenRecordset

i = (rs.RecordCount \ 16) * 16
PrintSheet
Me.RecordLabel.Caption = "Showing Record " & (i + 1) & " to " & (i + 16)

Set db = Nothing
Set rs = Nothing

End Sub

Private Sub ScrollLeft_Click()
If i >= 16 Then
i = i - 16
PrintSheet
Me.RecordLabel.Caption = "Showing Record " & (i + 1) & " to " & (i + 16)
End If
End Sub

Private Sub ScrollRight_Click()
i = i + 16
PrintSheet
Me.RecordLabel.Caption = "Showing Record " & (i + 1) & " to " & (i + 16)
End Sub
 
You never did tell us why you are not using a bound form. Your code is way overkill for what you're trying to accomplish, and much of what you are trying to program around is actually functionality built-in to Access. I understand that you are trying to view 16 entries at a time, but the methodology lends itself extremely well to bound controls and doesn't contain the multiple pitfalls of the path you've taken.

Wayne has already suggested a method for advancing forward or backward 16 records, and I never saw the reasoning behind unbound controls. I know you're an amateur (a sensitive one too, apparently ;) ), but really, none of us are experts at this. We're trying to determine the point of unbound controls and the rickety structure you've chosen.
 
I could not think of a way to use Bound Controls for what I was doing. Basically you have a Database with 50,000 clients. For each client stored in a large table there is a table called C_Notes which stores the notes and are commonly displayed as a continous form on the main front end.

My problem was I could not think logically through to translate the continous form for the client notes that are displayed one at a time into the form that I ended up making, as you say, the rickety way. But I really am amateur, jumped into this just a few weeks ago. And while I am learning fast, as you can more then likely see if you have any experience at all. It is ugly. I defintely know that.
 
So, to make sure I get it right, you've got a client table setup like this:

Code:
[U]ClientID[/U]   [U]ClientName[/U]
1          ABC Company
2          DEF Company
3          GHI Company
.          .
.          .
X          X company

And you have a notes table that is associated with this table, something like this:

Code:
[U]NoteID[/U]   [U]ClientID[/U]   [U]Notes[/U]
1        1          ABC Company did this
2        1          ABC Company did that
3        2          DEF Company did the other thing

Each client can have 0 to X number of notes associated with it.

Is that roughly your structure? If it's not, can you emulate that structure as it's normalized? Can you post a sample (removing sensitive data of course) so we can see the structure? Just zip up the DB and post it.

What you're asking for, given the context above, is really pretty simple, so long as the design is close to what I did above.
 
I will paste some of the headers and fields of the two tables being dealt with in just a short bit so you can see what I am working with. It is a lawfirm so I gotta of as you mentioned delete sensitive stuff on clients.

But you understand it comepletely. Your table examples are exactly the simplified version of how the tables are set up.
 
i've got a situation where a client is trying to quote materials, and they have predesigned forms with 42 product slots on.

so ive had to turn my normalised data into a form/report that carries exactly 42 slots fro prodcuts ... and prices ... and unit of measure ...

it was a real pain as it took ages lining everything up etc, and i had to work in a very similar way to the poster here. I really couldn't see another way round it.

maybe i could have written something to autogenerate the forms controls in the right places, rather than explicitily copying them, but i wasnt sure howeasy that would be either ...
 
After he posts a few sample lines from both tables, I'll show you how to do this efficiently and effectively.
 

Users who are viewing this thread

Back
Top Bottom