PC Review


Reply
Thread Tools Rate Thread

Display database records horizontally

 
 
Paul M
Guest
Posts: n/a
 
      8th Oct 2007
Hi
I am trying to build an online access database to display images
Is there a way of displaying records in rows of three horizontally then
another three etc insteadof one at a time vertically so it looks like the
images in this example
http://www.paulcmilner.co.uk/Gallery.asp

Here is the table that displays the records It only displays vertically
one ot a time

Thanks
Paul M


<table border="1">
<tr>
<th>Name</th>
<th>Sales</th>
</tr>
<%
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
%>
<tr>
<td><%= rstSearch.Fields("first_name").Value %> <%=
rstSearch.Fields("last_name").Value %></td>
<td><%= rstSearch.Fields("sales").Value %></td>
</tr>
<%

rstSearch.MoveNext
Loop
%>
</table>






 
Reply With Quote
 
 
 
 
Stefan B Rusynko
Guest
Posts: n/a
 
      8th Oct 2007
See http://www.asp101.com/samples/viewas...ile=photos.asp
- change: If I Mod 2 = 1 Then
- to If I Mod 3 = 1 Then


_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


"Paul M" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
| Hi
| I am trying to build an online access database to display images
| Is there a way of displaying records in rows of three horizontally then
| another three etc insteadof one at a time vertically so it looks like the
| images in this example
| http://www.paulcmilner.co.uk/Gallery.asp
|
| Here is the table that displays the records It only displays vertically
| one ot a time
|
| Thanks
| Paul M
|
|
| <table border="1">
| <tr>
| <th>Name</th>
| <th>Sales</th>
| </tr>
| <%
| Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
| %>
| <tr>
| <td><%= rstSearch.Fields("first_name").Value %> <%=
| rstSearch.Fields("last_name").Value %></td>
| <td><%= rstSearch.Fields("sales").Value %></td>
| </tr>
| <%
|
| rstSearch.MoveNext
| Loop
| %>
| </table>
|
|
|
|
|
|


 
Reply With Quote
 
Paul M
Guest
Posts: n/a
 
      8th Oct 2007
Thanks Stefan
In the code it says

' You'd probably get this info from a database or an XML file or
' something like that, but the source will vary based on your
' situation so I'm just loading the array manually.
arrPhotoNames = Array("09922491", "09999118", "10047069", "19079112", _
"19124507", "19151069", "19297986", "22474694", _
"22475208", "24231229", "30423914", "31931795")

arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
"You Are So Fired", "A Charming Hangover", _
"Pay the Man", "Give Yourself A Hand", _
"Stack", "The Office", "aVoid", _
"Spring Into Action", "Home Improvement")


How do I get a record into an array from a dayabase I have ste up a
connection to an access database. here is the display part of the record

<%= rstSearch.Fields("simage").Value %>
<%= rstSearch.Fields("simage_name").Value %>
<%= rstSearch.Fields("snumber").Value %>

Thanks
Paul M


"Stefan B Rusynko" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> See http://www.asp101.com/samples/viewas...ile=photos.asp
> - change: If I Mod 2 = 1 Then
> - to If I Mod 3 = 1 Then
>
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> _____________________________________________
>
>
> "Paul M" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> | Hi
> | I am trying to build an online access database to display images
> | Is there a way of displaying records in rows of three horizontally then
> | another three etc insteadof one at a time vertically so it looks like
> the
> | images in this example
> | http://www.paulcmilner.co.uk/Gallery.asp
> |
> | Here is the table that displays the records It only displays
> vertically
> | one ot a time
> |
> | Thanks
> | Paul M
> |
> |
> | <table border="1">
> | <tr>
> | <th>Name</th>
> | <th>Sales</th>
> | </tr>
> | <%
> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
> | %>
> | <tr>
> | <td><%= rstSearch.Fields("first_name").Value %> <%=
> | rstSearch.Fields("last_name").Value %></td>
> | <td><%= rstSearch.Fields("sales").Value %></td>
> | </tr>
> | <%
> |
> | rstSearch.MoveNext
> | Loop
> | %>
> | </table>
> |
> |
> |
> |
> |
> |
>
>



 
Reply With Quote
 
Paul M
Guest
Posts: n/a
 
      8th Oct 2007
Hi
Or do I need an array?
Paul M


"Paul M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Stefan
> In the code it says
>
> ' You'd probably get this info from a database or an XML file or
> ' something like that, but the source will vary based on your
> ' situation so I'm just loading the array manually.
> arrPhotoNames = Array("09922491", "09999118", "10047069", "19079112", _
> "19124507", "19151069", "19297986", "22474694", _
> "22475208", "24231229", "30423914", "31931795")
>
> arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
> "You Are So Fired", "A Charming Hangover", _
> "Pay the Man", "Give Yourself A Hand", _
> "Stack", "The Office", "aVoid", _
> "Spring Into Action", "Home Improvement")
>
>
> How do I get a record into an array from a dayabase I have ste up a
> connection to an access database. here is the display part of the record
>
> <%= rstSearch.Fields("simage").Value %>
> <%= rstSearch.Fields("simage_name").Value %>
> <%= rstSearch.Fields("snumber").Value %>
>
> Thanks
> Paul M
>
>
> "Stefan B Rusynko" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> See http://www.asp101.com/samples/viewas...ile=photos.asp
>> - change: If I Mod 2 = 1 Then
>> - to If I Mod 3 = 1 Then
>>
>>
>> _____________________________________________
>> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
>> "Warning - Using the F1 Key will not break anything!" (-;
>> _____________________________________________
>>
>>
>> "Paul M" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> | Hi
>> | I am trying to build an online access database to display images
>> | Is there a way of displaying records in rows of three horizontally
>> then
>> | another three etc insteadof one at a time vertically so it looks like
>> the
>> | images in this example
>> | http://www.paulcmilner.co.uk/Gallery.asp
>> |
>> | Here is the table that displays the records It only displays
>> vertically
>> | one ot a time
>> |
>> | Thanks
>> | Paul M
>> |
>> |
>> | <table border="1">
>> | <tr>
>> | <th>Name</th>
>> | <th>Sales</th>
>> | </tr>
>> | <%
>> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
>> | %>
>> | <tr>
>> | <td><%= rstSearch.Fields("first_name").Value %> <%=
>> | rstSearch.Fields("last_name").Value %></td>
>> | <td><%= rstSearch.Fields("sales").Value %></td>
>> | </tr>
>> | <%
>> |
>> | rstSearch.MoveNext
>> | Loop
>> | %>
>> | </table>
>> |
>> |
>> |
>> |
>> |
>> |
>>
>>

>
>



 
Reply With Quote
 
Paul M
Guest
Posts: n/a
 
      8th Oct 2007
Hi
I can't get my head around this is. for a start I need incorporate a search.
I have already done this but just need to display three accross at a time.
Is there anyway of modifying my existing table to display three in a row?

Paul M
"Paul M" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi
> Or do I need an array?
> Paul M
>
>
> "Paul M" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thanks Stefan
>> In the code it says
>>
>> ' You'd probably get this info from a database or an XML file or
>> ' something like that, but the source will vary based on your
>> ' situation so I'm just loading the array manually.
>> arrPhotoNames = Array("09922491", "09999118", "10047069", "19079112", _
>> "19124507", "19151069", "19297986", "22474694", _
>> "22475208", "24231229", "30423914", "31931795")
>>
>> arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
>> "You Are So Fired", "A Charming Hangover", _
>> "Pay the Man", "Give Yourself A Hand", _
>> "Stack", "The Office", "aVoid", _
>> "Spring Into Action", "Home Improvement")
>>
>>
>> How do I get a record into an array from a dayabase I have ste up a
>> connection to an access database. here is the display part of the record
>>
>> <%= rstSearch.Fields("simage").Value %>
>> <%= rstSearch.Fields("simage_name").Value %>
>> <%= rstSearch.Fields("snumber").Value %>
>>
>> Thanks
>> Paul M
>>
>>
>> "Stefan B Rusynko" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> See http://www.asp101.com/samples/viewas...ile=photos.asp
>>> - change: If I Mod 2 = 1 Then
>>> - to If I Mod 3 = 1 Then
>>>
>>>
>>> _____________________________________________
>>> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
>>> "Warning - Using the F1 Key will not break anything!" (-;
>>> _____________________________________________
>>>
>>>
>>> "Paul M" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>> | Hi
>>> | I am trying to build an online access database to display images
>>> | Is there a way of displaying records in rows of three horizontally
>>> then
>>> | another three etc insteadof one at a time vertically so it looks like
>>> the
>>> | images in this example
>>> | http://www.paulcmilner.co.uk/Gallery.asp
>>> |
>>> | Here is the table that displays the records It only displays
>>> vertically
>>> | one ot a time
>>> |
>>> | Thanks
>>> | Paul M
>>> |
>>> |
>>> | <table border="1">
>>> | <tr>
>>> | <th>Name</th>
>>> | <th>Sales</th>
>>> | </tr>
>>> | <%
>>> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
>>> | %>
>>> | <tr>
>>> | <td><%= rstSearch.Fields("first_name").Value %> <%=
>>> | rstSearch.Fields("last_name").Value %></td>
>>> | <td><%= rstSearch.Fields("sales").Value %></td>
>>> | </tr>
>>> | <%
>>> |
>>> | rstSearch.MoveNext
>>> | Loop
>>> | %>
>>> | </table>
>>> |
>>> |
>>> |
>>> |
>>> |
>>> |
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Ronx
Guest
Posts: n/a
 
      8th Oct 2007
<table border="1">
<tr>
<th>Name</th>
<th>Sales</th>
<th>Name</th>
<th>Sales</th>
<th>Name</th>
<th>Sales</th>
<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
if ii mod 3 = 1 then %>
</tr>
<tr>
<%
end if
ii = ii + 1
%>
<td><%= rstSearch.Fields("first_name").Value %> <%=
rstSearch.Fields("last_name").Value %></td>
<td><%= rstSearch.Fields("sales").Value %></td>
<%
rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<td>&nbsp;</td><td>&nbsp;</td>
<%
ii = ii+1
Loop
%>
</tr>
</table>

--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




"Paul M" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed):

> Hi
> I can't get my head around this is. for a start I need incorporate a search.
> I have already done this but just need to display three accross at a time.
> Is there anyway of modifying my existing table to display three in a row?
>
> Paul M
> "Paul M" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi
> > Or do I need an array?
> > Paul M
> >
> >
> > "Paul M" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Thanks Stefan
> >> In the code it says
> >>
> >> ' You'd probably get this info from a database or an XML file or
> >> ' something like that, but the source will vary based on your
> >> ' situation so I'm just loading the array manually.
> >> arrPhotoNames = Array("09922491", "09999118", "10047069", "19079112", _
> >> "19124507", "19151069", "19297986", "22474694", _
> >> "22475208", "24231229", "30423914", "31931795")
> >>
> >> arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
> >> "You Are So Fired", "A Charming Hangover", _
> >> "Pay the Man", "Give Yourself A Hand", _
> >> "Stack", "The Office", "aVoid", _
> >> "Spring Into Action", "Home Improvement")
> >>
> >>
> >> How do I get a record into an array from a dayabase I have ste up a
> >> connection to an access database. here is the display part of the record
> >>
> >> <%= rstSearch.Fields("simage").Value %>
> >> <%= rstSearch.Fields("simage_name").Value %>
> >> <%= rstSearch.Fields("snumber").Value %>
> >>
> >> Thanks
> >> Paul M
> >>
> >>
> >> "Stefan B Rusynko" <(E-Mail Removed)> wrote in message
> >> news:%(E-Mail Removed)...
> >>> See http://www.asp101.com/samples/viewas...ile=photos.asp
> >>> - change: If I Mod 2 = 1 Then
> >>> - to If I Mod 3 = 1 Then
> >>>
> >>>
> >>> _____________________________________________
> >>> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> >>> "Warning - Using the F1 Key will not break anything!" (-;
> >>> _____________________________________________
> >>>
> >>>
> >>> "Paul M" <(E-Mail Removed)> wrote in message
> >>> news:(E-Mail Removed)...
> >>> | Hi
> >>> | I am trying to build an online access database to display images
> >>> | Is there a way of displaying records in rows of three horizontally
> >>> then
> >>> | another three etc insteadof one at a time vertically so it looks like
> >>> the
> >>> | images in this example
> >>> | http://www.paulcmilner.co.uk/Gallery.asp
> >>> |
> >>> | Here is the table that displays the records It only displays
> >>> vertically
> >>> | one ot a time
> >>> |
> >>> | Thanks
> >>> | Paul M
> >>> |
> >>> |
> >>> | <table border="1">
> >>> | <tr>
> >>> | <th>Name</th>
> >>> | <th>Sales</th>
> >>> | </tr>
> >>> | <%
> >>> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
> >>> | %>
> >>> | <tr>
> >>> | <td><%= rstSearch.Fields("first_name").Value %> <%=
> >>> | rstSearch.Fields("last_name").Value %></td>
> >>> | <td><%= rstSearch.Fields("sales").Value %></td>
> >>> | </tr>
> >>> | <%
> >>> |
> >>> | rstSearch.MoveNext
> >>> | Loop
> >>> | %>
> >>> | </table>
> >>> |
> >>> |
> >>> |
> >>> |
> >>> |
> >>> |
> >>>
> >>>
> >>
> >>

> >
> >


 
Reply With Quote
 
Paul M
Guest
Posts: n/a
 
      8th Oct 2007
Dear Ron
Thankyou! Thankyou! Thankyou!
All day I have playing with this I think I have seen just about every error
statament from the asp error portfolio
Best wishes
Paul M

"Ronx" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> <table border="1">
> <tr>
> <th>Name</th>
> <th>Sales</th>
> <th>Name</th>
> <th>Sales</th>
> <th>Name</th>
> <th>Sales</th>
> <%
> ii=1
> Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
> if ii mod 3 = 1 then %>
> </tr>
> <tr>
> <%
> end if
> ii = ii + 1
> %>
> <td><%= rstSearch.Fields("first_name").Value %> <%=
> rstSearch.Fields("last_name").Value %></td>
> <td><%= rstSearch.Fields("sales").Value %></td>
> <%
> rstSearch.MoveNext
> Loop
> Do while (ii mod 3)<>1 %>
> <td>&nbsp;</td><td>&nbsp;</td>
> <%
> ii = ii+1
> Loop
> %>
> </tr>
> </table>
>
> --
> Ron Symonds - Microsoft MVP (FrontPage)
> Reply only to group - emails will be deleted unread.
>
> http://www.rxs-enterprises.org/fp
>
>
>
>
> "Paul M" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed):
>
>> Hi
>> I can't get my head around this is. for a start I need incorporate a
>> search.
>> I have already done this but just need to display three accross at a
>> time.
>> Is there anyway of modifying my existing table to display three in a
>> row?
>>
>> Paul M
>> "Paul M" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>> > Hi
>> > Or do I need an array?
>> > Paul M
>> >
>> >
>> > "Paul M" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> Thanks Stefan
>> >> In the code it says
>> >>
>> >> ' You'd probably get this info from a database or an XML file or
>> >> ' something like that, but the source will vary based on your
>> >> ' situation so I'm just loading the array manually.
>> >> arrPhotoNames = Array("09922491", "09999118", "10047069", "19079112",
>> >> _
>> >> "19124507", "19151069", "19297986", "22474694", _
>> >> "22475208", "24231229", "30423914", "31931795")
>> >>
>> >> arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
>> >> "You Are So Fired", "A Charming Hangover", _
>> >> "Pay the Man", "Give Yourself A Hand", _
>> >> "Stack", "The Office", "aVoid", _
>> >> "Spring Into Action", "Home Improvement")
>> >>
>> >>
>> >> How do I get a record into an array from a dayabase I have ste up a
>> >> connection to an access database. here is the display part of the
>> >> record
>> >>
>> >> <%= rstSearch.Fields("simage").Value %>
>> >> <%= rstSearch.Fields("simage_name").Value %>
>> >> <%= rstSearch.Fields("snumber").Value %>
>> >>
>> >> Thanks
>> >> Paul M
>> >>
>> >>
>> >> "Stefan B Rusynko" <(E-Mail Removed)> wrote in message
>> >> news:%(E-Mail Removed)...
>> >>> See http://www.asp101.com/samples/viewas...ile=photos.asp
>> >>> - change: If I Mod 2 = 1 Then
>> >>> - to If I Mod 3 = 1 Then
>> >>>
>> >>>
>> >>> _____________________________________________
>> >>> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
>> >>> "Warning - Using the F1 Key will not break anything!" (-;
>> >>> _____________________________________________
>> >>>
>> >>>
>> >>> "Paul M" <(E-Mail Removed)> wrote in message
>> >>> news:(E-Mail Removed)...
>> >>> | Hi
>> >>> | I am trying to build an online access database to display images
>> >>> | Is there a way of displaying records in rows of three horizontally
>> >>> then
>> >>> | another three etc insteadof one at a time vertically so it looks
>> >>> like
>> >>> the
>> >>> | images in this example
>> >>> | http://www.paulcmilner.co.uk/Gallery.asp
>> >>> |
>> >>> | Here is the table that displays the records It only displays
>> >>> vertically
>> >>> | one ot a time
>> >>> |
>> >>> | Thanks
>> >>> | Paul M
>> >>> |
>> >>> |
>> >>> | <table border="1">
>> >>> | <tr>
>> >>> | <th>Name</th>
>> >>> | <th>Sales</th>
>> >>> | </tr>
>> >>> | <%
>> >>> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage =
>> >>> iPageCurrent
>> >>> | %>
>> >>> | <tr>
>> >>> | <td><%= rstSearch.Fields("first_name").Value %> <%=
>> >>> | rstSearch.Fields("last_name").Value %></td>
>> >>> | <td><%= rstSearch.Fields("sales").Value %></td>
>> >>> | </tr>
>> >>> | <%
>> >>> |
>> >>> | rstSearch.MoveNext
>> >>> | Loop
>> >>> | %>
>> >>> | </table>
>> >>> |
>> >>> |
>> >>> |
>> >>> |
>> >>> |
>> >>> |
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >

>



 
Reply With Quote
 
Paul M
Guest
Posts: n/a
 
      8th Oct 2007
Hi
Ron I am now trying to put the sales under the persons name instead of to
the right. I have tried different ways but I can't seem to get it
I am most gratefull for your help
Paul M

"Paul M" <(E-Mail Removed)> wrote in message
news:Oo$(E-Mail Removed)...
> Dear Ron
> Thankyou! Thankyou! Thankyou!
> All day I have playing with this I think I have seen just about every
> error statament from the asp error portfolio
> Best wishes
> Paul M
>
> "Ronx" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> <table border="1">
>> <tr>
>> <th>Name</th>
>> <th>Sales</th>
>> <th>Name</th>
>> <th>Sales</th>
>> <th>Name</th>
>> <th>Sales</th>
>> <%
>> ii=1
>> Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
>> if ii mod 3 = 1 then %>
>> </tr>
>> <tr>
>> <%
>> end if
>> ii = ii + 1
>> %>
>> <td><%= rstSearch.Fields("first_name").Value %> <%=
>> rstSearch.Fields("last_name").Value %></td>
>> <td><%= rstSearch.Fields("sales").Value %></td>
>> <%
>> rstSearch.MoveNext
>> Loop
>> Do while (ii mod 3)<>1 %>
>> <td>&nbsp;</td><td>&nbsp;</td>
>> <%
>> ii = ii+1
>> Loop
>> %>
>> </tr>
>> </table>
>>
>> --
>> Ron Symonds - Microsoft MVP (FrontPage)
>> Reply only to group - emails will be deleted unread.
>>
>> http://www.rxs-enterprises.org/fp
>>
>>
>>
>>
>> "Paul M" <(E-Mail Removed)> wrote in message
>> news:#(E-Mail Removed):
>>
>>> Hi
>>> I can't get my head around this is. for a start I need incorporate a
>>> search.
>>> I have already done this but just need to display three accross at a
>>> time.
>>> Is there anyway of modifying my existing table to display three in a
>>> row?
>>>
>>> Paul M
>>> "Paul M" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>> > Hi
>>> > Or do I need an array?
>>> > Paul M
>>> >
>>> >
>>> > "Paul M" <(E-Mail Removed)> wrote in message
>>> > news:(E-Mail Removed)...
>>> >> Thanks Stefan
>>> >> In the code it says
>>> >>
>>> >> ' You'd probably get this info from a database or an XML file or
>>> >> ' something like that, but the source will vary based on your
>>> >> ' situation so I'm just loading the array manually.
>>> >> arrPhotoNames = Array("09922491", "09999118", "10047069", "19079112",
>>> >> _
>>> >> "19124507", "19151069", "19297986", "22474694",
>>> >> _
>>> >> "22475208", "24231229", "30423914", "31931795")
>>> >>
>>> >> arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
>>> >> "You Are So Fired", "A Charming Hangover", _
>>> >> "Pay the Man", "Give Yourself A Hand", _
>>> >> "Stack", "The Office", "aVoid", _
>>> >> "Spring Into Action", "Home Improvement")
>>> >>
>>> >>
>>> >> How do I get a record into an array from a dayabase I have ste up a
>>> >> connection to an access database. here is the display part of the
>>> >> record
>>> >>
>>> >> <%= rstSearch.Fields("simage").Value %>
>>> >> <%= rstSearch.Fields("simage_name").Value %>
>>> >> <%= rstSearch.Fields("snumber").Value %>
>>> >>
>>> >> Thanks
>>> >> Paul M
>>> >>
>>> >>
>>> >> "Stefan B Rusynko" <(E-Mail Removed)> wrote in message
>>> >> news:%(E-Mail Removed)...
>>> >>> See http://www.asp101.com/samples/viewas...ile=photos.asp
>>> >>> - change: If I Mod 2 = 1 Then
>>> >>> - to If I Mod 3 = 1 Then
>>> >>>
>>> >>>
>>> >>> _____________________________________________
>>> >>> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
>>> >>> "Warning - Using the F1 Key will not break anything!" (-;
>>> >>> _____________________________________________
>>> >>>
>>> >>>
>>> >>> "Paul M" <(E-Mail Removed)> wrote in message
>>> >>> news:(E-Mail Removed)...
>>> >>> | Hi
>>> >>> | I am trying to build an online access database to display images
>>> >>> | Is there a way of displaying records in rows of three horizontally
>>> >>> then
>>> >>> | another three etc insteadof one at a time vertically so it looks
>>> >>> like
>>> >>> the
>>> >>> | images in this example
>>> >>> | http://www.paulcmilner.co.uk/Gallery.asp
>>> >>> |
>>> >>> | Here is the table that displays the records It only displays
>>> >>> vertically
>>> >>> | one ot a time
>>> >>> |
>>> >>> | Thanks
>>> >>> | Paul M
>>> >>> |
>>> >>> |
>>> >>> | <table border="1">
>>> >>> | <tr>
>>> >>> | <th>Name</th>
>>> >>> | <th>Sales</th>
>>> >>> | </tr>
>>> >>> | <%
>>> >>> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage =
>>> >>> iPageCurrent
>>> >>> | %>
>>> >>> | <tr>
>>> >>> | <td><%= rstSearch.Fields("first_name").Value %> <%=
>>> >>> | rstSearch.Fields("last_name").Value %></td>
>>> >>> | <td><%= rstSearch.Fields("sales").Value %></td>
>>> >>> | </tr>
>>> >>> | <%
>>> >>> |
>>> >>> | rstSearch.MoveNext
>>> >>> | Loop
>>> >>> | %>
>>> >>> | </table>
>>> >>> |
>>> >>> |
>>> >>> |
>>> >>> |
>>> >>> |
>>> >>> |
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >
>>> >

>>

>
>



 
Reply With Quote
 
Paul M
Guest
Posts: n/a
 
      8th Oct 2007
Hi Ron
I have persevered and come up with removing the sales from the TH and adding
p tags in the code to created another line is this a good way to do
things? I know it looks a little strange but it is the effect I want before
adding images to the fields instead of First_names etc to create an image
gallery
here is the code

Thanks
Paul M



<table border="1">
<tr>
<th>Name</th>
<th></th>
<th>Name</th>
<th></th>
<th>Name</th>
<th></th>

<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
if ii mod 3 = 1 then %>
</tr>
<tr>
<%
end if
ii = ii + 1
%>
<td><%= rstSearch.Fields("first_name").Value %><%=
rstSearch.Fields("last_name").Value %><p></p><%=
rstSearch.Fields("sales").Value %></td>
<td></td>
<%
rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<td>&nbsp;</td><td>&nbsp;</td>
<%
ii = ii+1
Loop
%>
</tr>
</table>



"Paul M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> Ron I am now trying to put the sales under the persons name instead of to
> the right. I have tried different ways but I can't seem to get it
> I am most gratefull for your help
> Paul M
>
> "Paul M" <(E-Mail Removed)> wrote in message
> news:Oo$(E-Mail Removed)...
>> Dear Ron
>> Thankyou! Thankyou! Thankyou!
>> All day I have playing with this I think I have seen just about every
>> error statament from the asp error portfolio
>> Best wishes
>> Paul M
>>
>> "Ronx" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> <table border="1">
>>> <tr>
>>> <th>Name</th>
>>> <th>Sales</th>
>>> <th>Name</th>
>>> <th>Sales</th>
>>> <th>Name</th>
>>> <th>Sales</th>
>>> <%
>>> ii=1
>>> Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
>>> if ii mod 3 = 1 then %>
>>> </tr>
>>> <tr>
>>> <%
>>> end if
>>> ii = ii + 1
>>> %>
>>> <td><%= rstSearch.Fields("first_name").Value %> <%=
>>> rstSearch.Fields("last_name").Value %></td>
>>> <td><%= rstSearch.Fields("sales").Value %></td>
>>> <%
>>> rstSearch.MoveNext
>>> Loop
>>> Do while (ii mod 3)<>1 %>
>>> <td>&nbsp;</td><td>&nbsp;</td>
>>> <%
>>> ii = ii+1
>>> Loop
>>> %>
>>> </tr>
>>> </table>
>>>
>>> --
>>> Ron Symonds - Microsoft MVP (FrontPage)
>>> Reply only to group - emails will be deleted unread.
>>>
>>> http://www.rxs-enterprises.org/fp
>>>
>>>
>>>
>>>
>>> "Paul M" <(E-Mail Removed)> wrote in message
>>> news:#(E-Mail Removed):
>>>
>>>> Hi
>>>> I can't get my head around this is. for a start I need incorporate a
>>>> search.
>>>> I have already done this but just need to display three accross at a
>>>> time.
>>>> Is there anyway of modifying my existing table to display three in a
>>>> row?
>>>>
>>>> Paul M
>>>> "Paul M" <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>> > Hi
>>>> > Or do I need an array?
>>>> > Paul M
>>>> >
>>>> >
>>>> > "Paul M" <(E-Mail Removed)> wrote in message
>>>> > news:(E-Mail Removed)...
>>>> >> Thanks Stefan
>>>> >> In the code it says
>>>> >>
>>>> >> ' You'd probably get this info from a database or an XML file or
>>>> >> ' something like that, but the source will vary based on your
>>>> >> ' situation so I'm just loading the array manually.
>>>> >> arrPhotoNames = Array("09922491", "09999118", "10047069",
>>>> >> "19079112", _
>>>> >> "19124507", "19151069", "19297986", "22474694",
>>>> >> _
>>>> >> "22475208", "24231229", "30423914", "31931795")
>>>> >>
>>>> >> arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
>>>> >> "You Are So Fired", "A Charming Hangover", _
>>>> >> "Pay the Man", "Give Yourself A Hand", _
>>>> >> "Stack", "The Office", "aVoid", _
>>>> >> "Spring Into Action", "Home Improvement")
>>>> >>
>>>> >>
>>>> >> How do I get a record into an array from a dayabase I have ste up
>>>> >> a
>>>> >> connection to an access database. here is the display part of the
>>>> >> record
>>>> >>
>>>> >> <%= rstSearch.Fields("simage").Value %>
>>>> >> <%= rstSearch.Fields("simage_name").Value %>
>>>> >> <%= rstSearch.Fields("snumber").Value %>
>>>> >>
>>>> >> Thanks
>>>> >> Paul M
>>>> >>
>>>> >>
>>>> >> "Stefan B Rusynko" <(E-Mail Removed)> wrote in message
>>>> >> news:%(E-Mail Removed)...
>>>> >>> See http://www.asp101.com/samples/viewas...ile=photos.asp
>>>> >>> - change: If I Mod 2 = 1 Then
>>>> >>> - to If I Mod 3 = 1 Then
>>>> >>>
>>>> >>>
>>>> >>> _____________________________________________
>>>> >>> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
>>>> >>> "Warning - Using the F1 Key will not break anything!" (-;
>>>> >>> _____________________________________________
>>>> >>>
>>>> >>>
>>>> >>> "Paul M" <(E-Mail Removed)> wrote in message
>>>> >>> news:(E-Mail Removed)...
>>>> >>> | Hi
>>>> >>> | I am trying to build an online access database to display images
>>>> >>> | Is there a way of displaying records in rows of three
>>>> >>> horizontally
>>>> >>> then
>>>> >>> | another three etc insteadof one at a time vertically so it looks
>>>> >>> like
>>>> >>> the
>>>> >>> | images in this example
>>>> >>> | http://www.paulcmilner.co.uk/Gallery.asp
>>>> >>> |
>>>> >>> | Here is the table that displays the records It only displays
>>>> >>> vertically
>>>> >>> | one ot a time
>>>> >>> |
>>>> >>> | Thanks
>>>> >>> | Paul M
>>>> >>> |
>>>> >>> |
>>>> >>> | <table border="1">
>>>> >>> | <tr>
>>>> >>> | <th>Name</th>
>>>> >>> | <th>Sales</th>
>>>> >>> | </tr>
>>>> >>> | <%
>>>> >>> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage =
>>>> >>> iPageCurrent
>>>> >>> | %>
>>>> >>> | <tr>
>>>> >>> | <td><%= rstSearch.Fields("first_name").Value %> <%=
>>>> >>> | rstSearch.Fields("last_name").Value %></td>
>>>> >>> | <td><%= rstSearch.Fields("sales").Value %></td>
>>>> >>> | </tr>
>>>> >>> | <%
>>>> >>> |
>>>> >>> | rstSearch.MoveNext
>>>> >>> | Loop
>>>> >>> | %>
>>>> >>> | </table>
>>>> >>> |
>>>> >>> |
>>>> >>> |
>>>> >>> |
>>>> >>> |
>>>> >>> |
>>>> >>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>

>>
>>

>
>



 
Reply With Quote
 
Ronx
Guest
Posts: n/a
 
      9th Oct 2007
If "sales" is an image then the display could be strange, especially if
the names are of different lengths - some may take up more lines than
others.
It is fairly simple to display images all the same height - make them
all the same size, but only specify height in the image tag, but you
can't easily fit all names in the same space.

To overcome this the easiest way is to use your new code (tidied up a
little), but swap the image and names around:

<table border="1">
<th colspan="3">Sales</th>
<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
if ii mod 3 = 1 then %>
</tr><tr>
<%
end if
ii = ii + 1
%>
<td><%= rstSearch.Fields("sales").Value %><br><br><%=
rstSearch.Fields("first_name").Value %><%=
rstSearch.Fields("last_name").Value %></td>
<%
rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<td>&nbsp;</td>
<%
ii = ii+1
Loop
%>
</tr>
</table>

To have names above the sales and keep an even looking display will
require getting each row of 3 results into an array, then writing out
the array as 2 table rows - one row for names, the other for sales, then
using CSS to remove/set appropriate cell borders.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




"Paul M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> Hi Ron
> I have persevered and come up with removing the sales from the TH and adding
> p tags in the code to created another line is this a good way to do
> things? I know it looks a little strange but it is the effect I want before
> adding images to the fields instead of First_names etc to create an image
> gallery
> here is the code
>
> Thanks
> Paul M
>
>
>
> <table border="1">
> <tr>
> <th>Name</th>
> <th></th>
> <th>Name</th>
> <th></th>
> <th>Name</th>
> <th></th>
>
> <%
> ii=1
> Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
> if ii mod 3 = 1 then %>
> </tr>
> <tr>
> <%
> end if
> ii = ii + 1
> %>
> <td><%= rstSearch.Fields("first_name").Value %><%=
> rstSearch.Fields("last_name").Value %><p></p><%=
> rstSearch.Fields("sales").Value %></td>
> <td></td>
> <%
> rstSearch.MoveNext
> Loop
> Do while (ii mod 3)<>1 %>
> <td>&nbsp;</td><td>&nbsp;</td>
> <%
> ii = ii+1
> Loop
> %>
> </tr>
> </table>
>
>
>
> "Paul M" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi
> > Ron I am now trying to put the sales under the persons name instead of to
> > the right. I have tried different ways but I can't seem to get it
> > I am most gratefull for your help
> > Paul M
> >
> > "Paul M" <(E-Mail Removed)> wrote in message
> > news:Oo$(E-Mail Removed)...
> >> Dear Ron
> >> Thankyou! Thankyou! Thankyou!
> >> All day I have playing with this I think I have seen just about every
> >> error statament from the asp error portfolio
> >> Best wishes
> >> Paul M
> >>
> >> "Ronx" <(E-Mail Removed)> wrote in message
> >> news:%(E-Mail Removed)...
> >>> <table border="1">
> >>> <tr>
> >>> <th>Name</th>
> >>> <th>Sales</th>
> >>> <th>Name</th>
> >>> <th>Sales</th>
> >>> <th>Name</th>
> >>> <th>Sales</th>
> >>> <%
> >>> ii=1
> >>> Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
> >>> if ii mod 3 = 1 then %>
> >>> </tr>
> >>> <tr>
> >>> <%
> >>> end if
> >>> ii = ii + 1
> >>> %>
> >>> <td><%= rstSearch.Fields("first_name").Value %> <%=
> >>> rstSearch.Fields("last_name").Value %></td>
> >>> <td><%= rstSearch.Fields("sales").Value %></td>
> >>> <%
> >>> rstSearch.MoveNext
> >>> Loop
> >>> Do while (ii mod 3)<>1 %>
> >>> <td>&nbsp;</td><td>&nbsp;</td>
> >>> <%
> >>> ii = ii+1
> >>> Loop
> >>> %>
> >>> </tr>
> >>> </table>
> >>>
> >>> --
> >>> Ron Symonds - Microsoft MVP (FrontPage)
> >>> Reply only to group - emails will be deleted unread.
> >>>
> >>> http://www.rxs-enterprises.org/fp
> >>>
> >>>
> >>>
> >>>
> >>> "Paul M" <(E-Mail Removed)> wrote in message
> >>> news:#(E-Mail Removed):
> >>>
> >>>> Hi
> >>>> I can't get my head around this is. for a start I need incorporate a
> >>>> search.
> >>>> I have already done this but just need to display three accross at a
> >>>> time.
> >>>> Is there anyway of modifying my existing table to display three in a
> >>>> row?
> >>>>
> >>>> Paul M
> >>>> "Paul M" <(E-Mail Removed)> wrote in message
> >>>> news:%(E-Mail Removed)...
> >>>> > Hi
> >>>> > Or do I need an array?
> >>>> > Paul M
> >>>> >
> >>>> >
> >>>> > "Paul M" <(E-Mail Removed)> wrote in message
> >>>> > news:(E-Mail Removed)...
> >>>> >> Thanks Stefan
> >>>> >> In the code it says
> >>>> >>
> >>>> >> ' You'd probably get this info from a database or an XML file or
> >>>> >> ' something like that, but the source will vary based on your
> >>>> >> ' situation so I'm just loading the array manually.
> >>>> >> arrPhotoNames = Array("09922491", "09999118", "10047069",
> >>>> >> "19079112", _
> >>>> >> "19124507", "19151069", "19297986", "22474694",
> >>>> >> _
> >>>> >> "22475208", "24231229", "30423914", "31931795")
> >>>> >>
> >>>> >> arrPhotoTitles = Array("Freeway", "Symbology", "Ladies Night", _
> >>>> >> "You Are So Fired", "A Charming Hangover", _
> >>>> >> "Pay the Man", "Give Yourself A Hand", _
> >>>> >> "Stack", "The Office", "aVoid", _
> >>>> >> "Spring Into Action", "Home Improvement")
> >>>> >>
> >>>> >>
> >>>> >> How do I get a record into an array from a dayabase I have ste up
> >>>> >> a
> >>>> >> connection to an access database. here is the display part of the
> >>>> >> record
> >>>> >>
> >>>> >> <%= rstSearch.Fields("simage").Value %>
> >>>> >> <%= rstSearch.Fields("simage_name").Value %>
> >>>> >> <%= rstSearch.Fields("snumber").Value %>
> >>>> >>
> >>>> >> Thanks
> >>>> >> Paul M
> >>>> >>
> >>>> >>
> >>>> >> "Stefan B Rusynko" <(E-Mail Removed)> wrote in message
> >>>> >> news:%(E-Mail Removed)...
> >>>> >>> See http://www.asp101.com/samples/viewas...ile=photos.asp
> >>>> >>> - change: If I Mod 2 = 1 Then
> >>>> >>> - to If I Mod 3 = 1 Then
> >>>> >>>
> >>>> >>>
> >>>> >>> _____________________________________________
> >>>> >>> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> >>>> >>> "Warning - Using the F1 Key will not break anything!" (-;
> >>>> >>> _____________________________________________
> >>>> >>>
> >>>> >>>
> >>>> >>> "Paul M" <(E-Mail Removed)> wrote in message
> >>>> >>> news:(E-Mail Removed)...
> >>>> >>> | Hi
> >>>> >>> | I am trying to build an online access database to display images
> >>>> >>> | Is there a way of displaying records in rows of three
> >>>> >>> horizontally
> >>>> >>> then
> >>>> >>> | another three etc insteadof one at a time vertically so it looks
> >>>> >>> like
> >>>> >>> the
> >>>> >>> | images in this example
> >>>> >>> | http://www.paulcmilner.co.uk/Gallery.asp
> >>>> >>> |
> >>>> >>> | Here is the table that displays the records It only displays
> >>>> >>> vertically
> >>>> >>> | one ot a time
> >>>> >>> |
> >>>> >>> | Thanks
> >>>> >>> | Paul M
> >>>> >>> |
> >>>> >>> |
> >>>> >>> | <table border="1">
> >>>> >>> | <tr>
> >>>> >>> | <th>Name</th>
> >>>> >>> | <th>Sales</th>
> >>>> >>> | </tr>
> >>>> >>> | <%
> >>>> >>> | Do While Not rstSearch.EOF And rstSearch.AbsolutePage =
> >>>> >>> iPageCurrent
> >>>> >>> | %>
> >>>> >>> | <tr>
> >>>> >>> | <td><%= rstSearch.Fields("first_name").Value %> <%=
> >>>> >>> | rstSearch.Fields("last_name").Value %></td>
> >>>> >>> | <td><%= rstSearch.Fields("sales").Value %></td>
> >>>> >>> | </tr>
> >>>> >>> | <%
> >>>> >>> |
> >>>> >>> | rstSearch.MoveNext
> >>>> >>> | Loop
> >>>> >>> | %>
> >>>> >>> | </table>
> >>>> >>> |
> >>>> >>> |
> >>>> >>> |
> >>>> >>> |
> >>>> >>> |
> >>>> >>> |
> >>>> >>>
> >>>> >>>
> >>>> >>
> >>>> >>
> >>>> >
> >>>> >
> >>>
> >>
> >>

> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display number of records in database =?Utf-8?B?UmF5bW9uZG8=?= Microsoft Frontpage 2 4th Mar 2006 09:28 AM
How to display N records from a database in some Div's? Thanks. Shapper Microsoft ASP .NET 3 21st Apr 2005 12:14 PM
How to display 3 records of a database? Cor Ligthert Microsoft VB .NET 1 5th Jun 2004 12:46 PM
How to display 3 records of a database? Steven Spits Microsoft ASP .NET 1 5th Jun 2004 12:46 PM
How to display 3 records of a database? Cor Ligthert Microsoft VB .NET 0 4th Jun 2004 01:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:26 PM.