PC Review


Reply
Thread Tools Rate Thread

Can I insert empyt record (blank row) in a query based on condition an asp query

 
 
Dave
Guest
Posts: n/a
 
      14th Oct 2004
Using asp and my access db, I import class rosters into a transportation log
(excel ss).

In one record field, there is a data value "instructor". I want to know,
based on the word
"instructor", can I insert 3 blank rows about the instructors row of data.

The purpose is so the instructor's information stands out when this
information goes to a hotel and
airlines.

I have the query all set up and the hope is that a conditional statement
will see "instructor", insert 3 blank rows and then display the instructor's
row of data.

Is this possible?

Do While Not rs.Eof
If rs("Att") = "Instructor"

????

Else
Response.Write rs("Att")

End If
rs.movement
loop

Thanks in advance


 
Reply With Quote
 
 
 
 
Jim Buyens
Guest
Posts: n/a
 
      15th Oct 2004
Do I understand correctly that you're gathering the data in an Access
database, and then somehow converting it to Excel?

If so, how are you doing this conversion?

--
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


"Dave" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Using asp and my access db, I import class rosters into a transportation
> log (excel ss).
>
> In one record field, there is a data value "instructor". I want to know,
> based on the word
> "instructor", can I insert 3 blank rows about the instructors row of data.
>
> The purpose is so the instructor's information stands out when this
> information goes to a hotel and
> airlines.
>
> I have the query all set up and the hope is that a conditional statement
> will see "instructor", insert 3 blank rows and then display the
> instructor's row of data.
>
> Is this possible?
>
> Do While Not rs.Eof
> If rs("Att") = "Instructor"
>
> ????
>
> Else
> Response.Write rs("Att")
>
> End If
> rs.movement
> loop
>
> Thanks in advance
>



 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      15th Oct 2004
I am opening it as a spreadsheet in OE, then copying it and pasting the
sheet into a travel excel spreadsheet. The subsequent pages are already set
up to be linked to this data sheet.

Everything works well, except I want to separate the instructor.


"Jim Buyens" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Do I understand correctly that you're gathering the data in an Access
> database, and then somehow converting it to Excel?
>
> If so, how are you doing this conversion?
>
> --
> Jim Buyens
> Microsoft FrontPage MVP
> http://www.interlacken.com
> Author of:
> *----------------------------------------------------
> |\---------------------------------------------------
> || Microsoft Office FrontPage 2003 Inside Out
> ||---------------------------------------------------
> || Web Database Development Step by Step .NET Edition
> || Microsoft FrontPage Version 2002 Inside Out
> || Faster Smarter Beginning Programming
> || (All from Microsoft Press)
> |/---------------------------------------------------
> *----------------------------------------------------
>
>
> "Dave" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Using asp and my access db, I import class rosters into a transportation
>> log (excel ss).
>>
>> In one record field, there is a data value "instructor". I want to know,
>> based on the word
>> "instructor", can I insert 3 blank rows about the instructors row of
>> data.
>>
>> The purpose is so the instructor's information stands out when this
>> information goes to a hotel and
>> airlines.
>>
>> I have the query all set up and the hope is that a conditional statement
>> will see "instructor", insert 3 blank rows and then display the
>> instructor's row of data.
>>
>> Is this possible?
>>
>> Do While Not rs.Eof
>> If rs("Att") = "Instructor"
>>
>> ????
>>
>> Else
>> Response.Write rs("Att")
>>
>> End If
>> rs.movement
>> loop
>>
>> Thanks in advance
>>

>
>



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      15th Oct 2004
Not possible with the way you are current creating the spreadsheet. You would have to use a custom
written ASP/VBScript to export the content of the database to a Excel file format.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Dave" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> I am opening it as a spreadsheet in OE, then copying it and pasting the
> sheet into a travel excel spreadsheet. The subsequent pages are already set
> up to be linked to this data sheet.
>
> Everything works well, except I want to separate the instructor.
>
>
> "Jim Buyens" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Do I understand correctly that you're gathering the data in an Access
> > database, and then somehow converting it to Excel?
> >
> > If so, how are you doing this conversion?
> >
> > --
> > Jim Buyens
> > Microsoft FrontPage MVP
> > http://www.interlacken.com
> > Author of:
> > *----------------------------------------------------
> > |\---------------------------------------------------
> > || Microsoft Office FrontPage 2003 Inside Out
> > ||---------------------------------------------------
> > || Web Database Development Step by Step .NET Edition
> > || Microsoft FrontPage Version 2002 Inside Out
> > || Faster Smarter Beginning Programming
> > || (All from Microsoft Press)
> > |/---------------------------------------------------
> > *----------------------------------------------------
> >
> >
> > "Dave" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Using asp and my access db, I import class rosters into a transportation
> >> log (excel ss).
> >>
> >> In one record field, there is a data value "instructor". I want to know,
> >> based on the word
> >> "instructor", can I insert 3 blank rows about the instructors row of
> >> data.
> >>
> >> The purpose is so the instructor's information stands out when this
> >> information goes to a hotel and
> >> airlines.
> >>
> >> I have the query all set up and the hope is that a conditional statement
> >> will see "instructor", insert 3 blank rows and then display the
> >> instructor's row of data.
> >>
> >> Is this possible?
> >>
> >> Do While Not rs.Eof
> >> If rs("Att") = "Instructor"
> >>
> >> ????
> >>
> >> Else
> >> Response.Write rs("Att")
> >>
> >> End If
> >> rs.movement
> >> loop
> >>
> >> Thanks in advance
> >>

> >
> >

>
>



 
Reply With Quote
 
Jim Buyens
Guest
Posts: n/a
 
      15th Oct 2004
I don't get it. How does your appliction involve FrontPage, or at
least Web Development?

If this is really an Excel question, like how to write a macro that
does what you want, you should be posting to an Excel newsgroup.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


"Dave" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> I am opening it as a spreadsheet in OE, then copying it and pasting the
> sheet into a travel excel spreadsheet. The subsequent pages are already set
> up to be linked to this data sheet.
>
> Everything works well, except I want to separate the instructor.
>
>
> "Jim Buyens" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Do I understand correctly that you're gathering the data in an Access
> > database, and then somehow converting it to Excel?
> >
> > If so, how are you doing this conversion?
> >
> > --
> > Jim Buyens
> > Microsoft FrontPage MVP
> > http://www.interlacken.com
> > Author of:
> > *----------------------------------------------------
> > |\---------------------------------------------------
> > || Microsoft Office FrontPage 2003 Inside Out
> > ||---------------------------------------------------
> > || Web Database Development Step by Step .NET Edition
> > || Microsoft FrontPage Version 2002 Inside Out
> > || Faster Smarter Beginning Programming
> > || (All from Microsoft Press)
> > |/---------------------------------------------------
> > *----------------------------------------------------
> >
> >
> > "Dave" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Using asp and my access db, I import class rosters into a transportation
> >> log (excel ss).
> >>
> >> In one record field, there is a data value "instructor". I want to know,
> >> based on the word
> >> "instructor", can I insert 3 blank rows about the instructors row of
> >> data.
> >>
> >> The purpose is so the instructor's information stands out when this
> >> information goes to a hotel and
> >> airlines.
> >>
> >> I have the query all set up and the hope is that a conditional statement
> >> will see "instructor", insert 3 blank rows and then display the
> >> instructor's row of data.
> >>
> >> Is this possible?
> >>
> >> Do While Not rs.Eof
> >> If rs("Att") = "Instructor"
> >>
> >> ????
> >>
> >> Else
> >> Response.Write rs("Att")
> >>
> >> End If
> >> rs.movement
> >> loop
> >>
> >> Thanks in advance
> >>

> >
> >

 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      15th Oct 2004
I use asp to query the database on the server and I get a table as a result.
with rows and columns, all written in asp and FrontPage.

The last row in the query results is one that I would like to insert blank
rows about in the asp query. I then use this in excel, not an excel question
but a Conditional query question.

Here is part of the query - the question marks seem like a logical place to
increment the query results 3 blank rows. It is not so much an excel
question but an asp question.

Dave

Do While Not rs.Eof
If rs("Att") = "Instructor"
????
Else
Response.Write rs("Att")
End If
rs.movement
loop

"Jim Buyens" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I don't get it. How does your appliction involve FrontPage, or at
> least Web Development?
>
> If this is really an Excel question, like how to write a macro that
> does what you want, you should be posting to an Excel newsgroup.
>
> Jim Buyens
> Microsoft FrontPage MVP
> http://www.interlacken.com
> Author of:
> *----------------------------------------------------
> |\---------------------------------------------------
> || Microsoft Office FrontPage 2003 Inside Out
> ||---------------------------------------------------
> || Web Database Development Step by Step .NET Edition
> || Microsoft FrontPage Version 2002 Inside Out
> || Faster Smarter Beginning Programming
> || (All from Microsoft Press)
> |/---------------------------------------------------
> *----------------------------------------------------
>
>
> "Dave" <(E-Mail Removed)> wrote in message
> news:<(E-Mail Removed)>...
>> I am opening it as a spreadsheet in OE, then copying it and pasting the
>> sheet into a travel excel spreadsheet. The subsequent pages are already
>> set
>> up to be linked to this data sheet.
>>
>> Everything works well, except I want to separate the instructor.
>>
>>
>> "Jim Buyens" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Do I understand correctly that you're gathering the data in an Access
>> > database, and then somehow converting it to Excel?
>> >
>> > If so, how are you doing this conversion?
>> >
>> > --
>> > Jim Buyens
>> > Microsoft FrontPage MVP
>> > http://www.interlacken.com
>> > Author of:
>> > *----------------------------------------------------
>> > |\---------------------------------------------------
>> > || Microsoft Office FrontPage 2003 Inside Out
>> > ||---------------------------------------------------
>> > || Web Database Development Step by Step .NET Edition
>> > || Microsoft FrontPage Version 2002 Inside Out
>> > || Faster Smarter Beginning Programming
>> > || (All from Microsoft Press)
>> > |/---------------------------------------------------
>> > *----------------------------------------------------
>> >
>> >
>> > "Dave" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> Using asp and my access db, I import class rosters into a
>> >> transportation
>> >> log (excel ss).
>> >>
>> >> In one record field, there is a data value "instructor". I want to
>> >> know,
>> >> based on the word
>> >> "instructor", can I insert 3 blank rows about the instructors row of
>> >> data.
>> >>
>> >> The purpose is so the instructor's information stands out when this
>> >> information goes to a hotel and
>> >> airlines.
>> >>
>> >> I have the query all set up and the hope is that a conditional
>> >> statement
>> >> will see "instructor", insert 3 blank rows and then display the
>> >> instructor's row of data.
>> >>
>> >> Is this possible?
>> >>
>> >> Do While Not rs.Eof
>> >> If rs("Att") = "Instructor"
>> >>
>> >> ????
>> >>
>> >> Else
>> >> Response.Write rs("Att")
>> >>
>> >> End If
>> >> rs.movement
>> >> loop
>> >>
>> >> Thanks in advance
>> >>
>> >
>> >



 
Reply With Quote
 
Jim Buyens
Guest
Posts: n/a
 
      16th Oct 2004
You still haven't explained how the data is getting from the access
database on the Web server to your spreadsheet.

As a result, I'm going to take a wild guess and suppose your ASP page
changes the response content-type header to application/vnd.ms-excel
or application/csv, then queries the database, and then writes
comma-separated values record into the response stream.

If so, it should be no trouble to response.write three blank record
when the condition you care about comes up.

If you're doing something else, please explain what that is.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------




"Dave" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> I use asp to query the database on the server and I get a table as a result.
> with rows and columns, all written in asp and FrontPage.
>
> The last row in the query results is one that I would like to insert blank
> rows about in the asp query. I then use this in excel, not an excel question
> but a Conditional query question.
>
> Here is part of the query - the question marks seem like a logical place to
> increment the query results 3 blank rows. It is not so much an excel
> question but an asp question.
>
> Dave
>
> Do While Not rs.Eof
> If rs("Att") = "Instructor"
> ????
> Else
> Response.Write rs("Att")
> End If
> rs.movement
> loop
>
> "Jim Buyens" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I don't get it. How does your appliction involve FrontPage, or at
> > least Web Development?
> >
> > If this is really an Excel question, like how to write a macro that
> > does what you want, you should be posting to an Excel newsgroup.
> >
> > Jim Buyens
> > Microsoft FrontPage MVP
> > http://www.interlacken.com
> > Author of:
> > *----------------------------------------------------
> > |\---------------------------------------------------
> > || Microsoft Office FrontPage 2003 Inside Out
> > ||---------------------------------------------------
> > || Web Database Development Step by Step .NET Edition
> > || Microsoft FrontPage Version 2002 Inside Out
> > || Faster Smarter Beginning Programming
> > || (All from Microsoft Press)
> > |/---------------------------------------------------
> > *----------------------------------------------------
> >
> >
> > "Dave" <(E-Mail Removed)> wrote in message
> > news:<(E-Mail Removed)>...
> >> I am opening it as a spreadsheet in OE, then copying it and pasting the
> >> sheet into a travel excel spreadsheet. The subsequent pages are already
> >> set
> >> up to be linked to this data sheet.
> >>
> >> Everything works well, except I want to separate the instructor.
> >>
> >>
> >> "Jim Buyens" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > Do I understand correctly that you're gathering the data in an Access
> >> > database, and then somehow converting it to Excel?
> >> >
> >> > If so, how are you doing this conversion?
> >> >
> >> > --
> >> > Jim Buyens
> >> > Microsoft FrontPage MVP
> >> > http://www.interlacken.com
> >> > Author of:
> >> > *----------------------------------------------------
> >> > |\---------------------------------------------------
> >> > || Microsoft Office FrontPage 2003 Inside Out
> >> > ||---------------------------------------------------
> >> > || Web Database Development Step by Step .NET Edition
> >> > || Microsoft FrontPage Version 2002 Inside Out
> >> > || Faster Smarter Beginning Programming
> >> > || (All from Microsoft Press)
> >> > |/---------------------------------------------------
> >> > *----------------------------------------------------
> >> >
> >> >
> >> > "Dave" <(E-Mail Removed)> wrote in message
> >> > news:(E-Mail Removed)...
> >> >> Using asp and my access db, I import class rosters into a
> >> >> transportation
> >> >> log (excel ss).
> >> >>
> >> >> In one record field, there is a data value "instructor". I want to
> >> >> know,
> >> >> based on the word
> >> >> "instructor", can I insert 3 blank rows about the instructors row of
> >> >> data.
> >> >>
> >> >> The purpose is so the instructor's information stands out when this
> >> >> information goes to a hotel and
> >> >> airlines.
> >> >>
> >> >> I have the query all set up and the hope is that a conditional
> >> >> statement
> >> >> will see "instructor", insert 3 blank rows and then display the
> >> >> instructor's row of data.
> >> >>
> >> >> Is this possible?
> >> >>
> >> >> Do While Not rs.Eof
> >> >> If rs("Att") = "Instructor"
> >> >>
> >> >> ????
> >> >>
> >> >> Else
> >> >> Response.Write rs("Att")
> >> >>
> >> >> End If
> >> >> rs.movement
> >> >> loop
> >> >>
> >> >> Thanks in advance
> >> >>
> >> >
> >> >

 
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
Query for Reports- Sort by condition, leave blank to include all =?Utf-8?B?Sm9kc3Rhcg==?= Microsoft Access 2 28th May 2007 08:22 PM
Macro condition to determine query record counts =?Utf-8?B?Um9iZXJ0X0xfUm9zcw==?= Microsoft Access Macros 0 29th Oct 2004 07:25 PM
Macro condition to determine query record counts =?Utf-8?B?Um9iZXJ0X0xfUm9zcw==?= Microsoft Access Macros 0 29th Oct 2004 07:24 PM
Sorry for confusion :Re: Can I insert empyt record (blank row) in a query based on condition an asp query Dave Microsoft Frontpage 0 18th Oct 2004 03:42 PM
Insert Blank Line In Query? =?Utf-8?B?TURX?= Microsoft Access Queries 5 29th Sep 2004 07:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:45 PM.