By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,481 Members | 3,046 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,481 IT Pros & Developers. It's quick & easy.

Continuous Data Form

P: n/a
Hi,
I am trying to create form that displays data like an Access continuous
dataform rather than using a data grid.

I am thinking that I can achieve this by creating a row of text boxes, one
for each field I need to display. The creating a controls array for the
first n records I show and populate the text boxes. Then setting up a
vertical scroll bar for the number of records in the data table.

As the scroll bar is clicked or dragged, I will need to recreate the
controls array for each record/field.

Is there any easier way to achieve this result?

Thanks

Doug
Nov 21 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Dough,

See this sample I once made, it looks in my opinion that it can help with
your question.
You will have to use textboxes of course instead of buttons.

I hope this helps?

Cor

\\\You can paste it directly in a created project code
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim start As Integer = 4
Dim top As Integer = 25
Dim i As Integer
Dim nowdate As DateTime = DateTime.Now
Dim mybutton(System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month)) As Button
For i = 0 To System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month) - 1
mybutton(i) = New Button
mybutton(i).TextAlign = ContentAlignment.MiddleCenter
mybutton(i).Width = 40
mybutton(i).Height = 20
mybutton(i).FlatStyle = FlatStyle.Flat
mybutton(i).BackColor = Drawing.Color.AntiqueWhite
mybutton(i).Location = New System.Drawing.Point(start, top)
mybutton(i).Text = (i + 1).ToString
mybutton(i).Cursor = Cursors.Hand
Me.Controls.Add(mybutton(i))
AddHandler mybutton(i).Click, AddressOf mybutton_Click
AddHandler mybutton(i).MouseHover, AddressOf mybutton_Hoover
AddHandler mybutton(i).MouseLeave, AddressOf mybutton_Leave
start = start + 40
If (i + 1) Mod 5 = 0 Then
top = top + 20
start = 4
End If
Next
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
MessageBox.Show("The day is: " & thisbutton.Text)
End Sub
Private Sub mybutton_Hoover _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AliceBlue
End Sub
Private Sub mybutton_Leave _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AntiqueWhite
End Sub
///

Nov 21 '05 #2

P: n/a
Thanks Cor.

Is that the way you would tackle the requirement of creating an Access like
continuous form?

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Dough,

See this sample I once made, it looks in my opinion that it can help with
your question.
You will have to use textboxes of course instead of buttons.

I hope this helps?

Cor

\\\You can paste it directly in a created project code
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim start As Integer = 4
Dim top As Integer = 25
Dim i As Integer
Dim nowdate As DateTime = DateTime.Now
Dim mybutton(System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month)) As Button
For i = 0 To System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month) - 1
mybutton(i) = New Button
mybutton(i).TextAlign = ContentAlignment.MiddleCenter
mybutton(i).Width = 40
mybutton(i).Height = 20
mybutton(i).FlatStyle = FlatStyle.Flat
mybutton(i).BackColor = Drawing.Color.AntiqueWhite
mybutton(i).Location = New System.Drawing.Point(start, top)
mybutton(i).Text = (i + 1).ToString
mybutton(i).Cursor = Cursors.Hand
Me.Controls.Add(mybutton(i))
AddHandler mybutton(i).Click, AddressOf mybutton_Click
AddHandler mybutton(i).MouseHover, AddressOf mybutton_Hoover
AddHandler mybutton(i).MouseLeave, AddressOf mybutton_Leave
start = start + 40
If (i + 1) Mod 5 = 0 Then
top = top + 20
start = 4
End If
Next
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
MessageBox.Show("The day is: " & thisbutton.Text)
End Sub
Private Sub mybutton_Hoover _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AliceBlue
End Sub
Private Sub mybutton_Leave _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AntiqueWhite
End Sub
///

Nov 21 '05 #3

P: n/a
Doug,

Difficult to answer for me, because I do not know what is an Access like
continuous form.

However you wrote that you thought of building dynamicly textboxes and this
does the same.

Cor

"Doug Bell" <dug@bigpond>
...
Thanks Cor.

Is that the way you would tackle the requirement of creating an Access
like
continuous form?

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Dough,

See this sample I once made, it looks in my opinion that it can help with
your question.
You will have to use textboxes of course instead of buttons.

I hope this helps?

Cor

\\\You can paste it directly in a created project code
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim start As Integer = 4
Dim top As Integer = 25
Dim i As Integer
Dim nowdate As DateTime = DateTime.Now
Dim mybutton(System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month)) As Button
For i = 0 To System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month) - 1
mybutton(i) = New Button
mybutton(i).TextAlign = ContentAlignment.MiddleCenter
mybutton(i).Width = 40
mybutton(i).Height = 20
mybutton(i).FlatStyle = FlatStyle.Flat
mybutton(i).BackColor = Drawing.Color.AntiqueWhite
mybutton(i).Location = New System.Drawing.Point(start, top)
mybutton(i).Text = (i + 1).ToString
mybutton(i).Cursor = Cursors.Hand
Me.Controls.Add(mybutton(i))
AddHandler mybutton(i).Click, AddressOf mybutton_Click
AddHandler mybutton(i).MouseHover, AddressOf mybutton_Hoover
AddHandler mybutton(i).MouseLeave, AddressOf mybutton_Leave
start = start + 40
If (i + 1) Mod 5 = 0 Then
top = top + 20
start = 4
End If
Next
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
MessageBox.Show("The day is: " & thisbutton.Text)
End Sub
Private Sub mybutton_Hoover _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AliceBlue
End Sub
Private Sub mybutton_Leave _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AntiqueWhite
End Sub
///


Nov 21 '05 #4

P: n/a
What he is asking for Cor, I think is a Data Enabled form with some record
selectors at the bottom to allow you to scan through some records, is this
right Doug ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
Doug,

Difficult to answer for me, because I do not know what is an Access like
continuous form.

However you wrote that you thought of building dynamicly textboxes and this does the same.

Cor

"Doug Bell" <dug@bigpond>
..
Thanks Cor.

Is that the way you would tackle the requirement of creating an Access
like
continuous form?

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Dough,

See this sample I once made, it looks in my opinion that it can help with your question.
You will have to use textboxes of course instead of buttons.

I hope this helps?

Cor

\\\You can paste it directly in a created project code
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim start As Integer = 4
Dim top As Integer = 25
Dim i As Integer
Dim nowdate As DateTime = DateTime.Now
Dim mybutton(System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month)) As Button
For i = 0 To System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month) - 1
mybutton(i) = New Button
mybutton(i).TextAlign = ContentAlignment.MiddleCenter
mybutton(i).Width = 40
mybutton(i).Height = 20
mybutton(i).FlatStyle = FlatStyle.Flat
mybutton(i).BackColor = Drawing.Color.AntiqueWhite
mybutton(i).Location = New System.Drawing.Point(start, top)
mybutton(i).Text = (i + 1).ToString
mybutton(i).Cursor = Cursors.Hand
Me.Controls.Add(mybutton(i))
AddHandler mybutton(i).Click, AddressOf mybutton_Click
AddHandler mybutton(i).MouseHover, AddressOf mybutton_Hoover AddHandler mybutton(i).MouseLeave, AddressOf mybutton_Leave
start = start + 40
If (i + 1) Mod 5 = 0 Then
top = top + 20
start = 4
End If
Next
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
MessageBox.Show("The day is: " & thisbutton.Text)
End Sub
Private Sub mybutton_Hoover _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AliceBlue
End Sub
Private Sub mybutton_Leave _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AntiqueWhite
End Sub
///



Nov 21 '05 #5

P: n/a
Terry,

You mean that terrible standard dataform wizard which is in the items?

Cor

"One Handed Man ( OHM - Terry Burns )bl...
What he is asking for Cor, I think is a Data Enabled form with some record
selectors at the bottom to allow you to scan through some records, is this
right Doug ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
Doug,

Difficult to answer for me, because I do not know what is an Access like
continuous form.

However you wrote that you thought of building dynamicly textboxes and

this
does the same.

Cor

"Doug Bell" <dug@bigpond>
..
> Thanks Cor.
>
> Is that the way you would tackle the requirement of creating an Access
> like
> continuous form?
>
> "Cor Ligthert" <no************@planet.nl> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
>> Dough,
>>
>> See this sample I once made, it looks in my opinion that it can help with >> your question.
>> You will have to use textboxes of course instead of buttons.
>>
>> I hope this helps?
>>
>> Cor
>>
>> \\\You can paste it directly in a created project code
>> Private Sub Form1_Load(ByVal sender As Object, _
>> ByVal e As System.EventArgs) Handles MyBase.Load
>> Dim start As Integer = 4
>> Dim top As Integer = 25
>> Dim i As Integer
>> Dim nowdate As DateTime = DateTime.Now
>> Dim mybutton(System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month)) As Button
>> For i = 0 To System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month) - 1
>> mybutton(i) = New Button
>> mybutton(i).TextAlign = ContentAlignment.MiddleCenter
>> mybutton(i).Width = 40
>> mybutton(i).Height = 20
>> mybutton(i).FlatStyle = FlatStyle.Flat
>> mybutton(i).BackColor = Drawing.Color.AntiqueWhite
>> mybutton(i).Location = New System.Drawing.Point(start,
>> top)
>> mybutton(i).Text = (i + 1).ToString
>> mybutton(i).Cursor = Cursors.Hand
>> Me.Controls.Add(mybutton(i))
>> AddHandler mybutton(i).Click, AddressOf mybutton_Click
>> AddHandler mybutton(i).MouseHover, AddressOf mybutton_Hoover >> AddHandler mybutton(i).MouseLeave, AddressOf
>> mybutton_Leave
>> start = start + 40
>> If (i + 1) Mod 5 = 0 Then
>> top = top + 20
>> start = 4
>> End If
>> Next
>> End Sub
>> Private Sub mybutton_Click _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> MessageBox.Show("The day is: " & thisbutton.Text)
>> End Sub
>> Private Sub mybutton_Hoover _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AliceBlue
>> End Sub
>> Private Sub mybutton_Leave _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AntiqueWhite
>> End Sub
>> ///
>>
>>
>>
>
>



Nov 21 '05 #6

P: n/a
I think so

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Terry,

You mean that terrible standard dataform wizard which is in the items?

Cor

"One Handed Man ( OHM - Terry Burns )bl...
What he is asking for Cor, I think is a Data Enabled form with some record selectors at the bottom to allow you to scan through some records, is this right Doug ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
Doug,

Difficult to answer for me, because I do not know what is an Access like continuous form.

However you wrote that you thought of building dynamicly textboxes and

this
does the same.

Cor

"Doug Bell" <dug@bigpond>
..
> Thanks Cor.
>
> Is that the way you would tackle the requirement of creating an Access > like
> continuous form?
>
> "Cor Ligthert" <no************@planet.nl> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
>> Dough,
>>
>> See this sample I once made, it looks in my opinion that it can help

with
>> your question.
>> You will have to use textboxes of course instead of buttons.
>>
>> I hope this helps?
>>
>> Cor
>>
>> \\\You can paste it directly in a created project code
>> Private Sub Form1_Load(ByVal sender As Object, _
>> ByVal e As System.EventArgs) Handles MyBase.Load
>> Dim start As Integer = 4
>> Dim top As Integer = 25
>> Dim i As Integer
>> Dim nowdate As DateTime = DateTime.Now
>> Dim mybutton(System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month)) As Button
>> For i = 0 To System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month) - 1
>> mybutton(i) = New Button
>> mybutton(i).TextAlign = ContentAlignment.MiddleCenter
>> mybutton(i).Width = 40
>> mybutton(i).Height = 20
>> mybutton(i).FlatStyle = FlatStyle.Flat
>> mybutton(i).BackColor = Drawing.Color.AntiqueWhite
>> mybutton(i).Location = New System.Drawing.Point(start,
>> top)
>> mybutton(i).Text = (i + 1).ToString
>> mybutton(i).Cursor = Cursors.Hand
>> Me.Controls.Add(mybutton(i))
>> AddHandler mybutton(i).Click, AddressOf mybutton_Click
>> AddHandler mybutton(i).MouseHover, AddressOf

mybutton_Hoover
>> AddHandler mybutton(i).MouseLeave, AddressOf
>> mybutton_Leave
>> start = start + 40
>> If (i + 1) Mod 5 = 0 Then
>> top = top + 20
>> start = 4
>> End If
>> Next
>> End Sub
>> Private Sub mybutton_Click _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> MessageBox.Show("The day is: " & thisbutton.Text)
>> End Sub
>> Private Sub mybutton_Hoover _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AliceBlue
>> End Sub
>> Private Sub mybutton_Leave _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AntiqueWhite
>> End Sub
>> ///
>>
>>
>>
>
>



Nov 21 '05 #7

P: n/a
Hi Terry,
Not exactly.

Access allows you to define a form as a continuous form. You then place
controls on the form and bind them to fields of a recordset.
When you open the form it displays the controls with the data from the first
record and then repeats a copy of all the controls populated with data from
the second record and so on to the end of the page. The scroll bar allows
you to scroll down through the record set.
It is like a data grid except that each row does not have to be in line,
each field is in a separate control (text box or check box etc) and all
those controls are repeated.

The code that Cor provided could be the base of a similar looking form
developed in Dot Net. I have done something similar in VB but I was thinking
that possibly there was an easier way in Dot Net. I think ASP.Net provides a
repeater (?) that might do something similar.

Thanks for the replys.

Doug

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
What he is asking for Cor, I think is a Data Enabled form with some record
selectors at the bottom to allow you to scan through some records, is this
right Doug ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
Doug,

Difficult to answer for me, because I do not know what is an Access like
continuous form.

However you wrote that you thought of building dynamicly textboxes and

this
does the same.

Cor

"Doug Bell" <dug@bigpond>
..
Thanks Cor.

Is that the way you would tackle the requirement of creating an Access
like
continuous form?

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> Dough,
>
> See this sample I once made, it looks in my opinion that it can help with> your question.
> You will have to use textboxes of course instead of buttons.
>
> I hope this helps?
>
> Cor
>
> \\\You can paste it directly in a created project code
> Private Sub Form1_Load(ByVal sender As Object, _
> ByVal e As System.EventArgs) Handles MyBase.Load
> Dim start As Integer = 4
> Dim top As Integer = 25
> Dim i As Integer
> Dim nowdate As DateTime = DateTime.Now
> Dim mybutton(System.DateTime.DaysInMonth _
> (nowdate.Year, nowdate.Month)) As Button
> For i = 0 To System.DateTime.DaysInMonth _
> (nowdate.Year, nowdate.Month) - 1
> mybutton(i) = New Button
> mybutton(i).TextAlign = ContentAlignment.MiddleCenter
> mybutton(i).Width = 40
> mybutton(i).Height = 20
> mybutton(i).FlatStyle = FlatStyle.Flat
> mybutton(i).BackColor = Drawing.Color.AntiqueWhite
> mybutton(i).Location = New System.Drawing.Point(start, top)> mybutton(i).Text = (i + 1).ToString
> mybutton(i).Cursor = Cursors.Hand
> Me.Controls.Add(mybutton(i))
> AddHandler mybutton(i).Click, AddressOf mybutton_Click
> AddHandler mybutton(i).MouseHover, AddressOf mybutton_Hoover> AddHandler mybutton(i).MouseLeave, AddressOf mybutton_Leave> start = start + 40
> If (i + 1) Mod 5 = 0 Then
> top = top + 20
> start = 4
> End If
> Next
> End Sub
> Private Sub mybutton_Click _
> (ByVal sender As Object, ByVal e As System.EventArgs)
> Dim thisbutton As Button = DirectCast(sender, Button)
> MessageBox.Show("The day is: " & thisbutton.Text)
> End Sub
> Private Sub mybutton_Hoover _
> (ByVal sender As Object, ByVal e As System.EventArgs)
> Dim thisbutton As Button = DirectCast(sender, Button)
> thisbutton.BackColor = Drawing.Color.AliceBlue
> End Sub
> Private Sub mybutton_Leave _
> (ByVal sender As Object, ByVal e As System.EventArgs)
> Dim thisbutton As Button = DirectCast(sender, Button)
> thisbutton.BackColor = Drawing.Color.AntiqueWhite
> End Sub
> ///
>
>
>



Nov 21 '05 #8

P: n/a
Cor,
Not a wizard but it does use the standard bound form and then allows you to
set its property as a continuos form so that you can format the way that
each field is displayed.
You do need to bind the form to a recordset and the controls to fields. It
looks better than a list box or a dataset view. Good for displaying data
such as Order Number Headers allowing you to select an Order and then drill
in to see the Order's lines etc.
Doug
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Terry,

You mean that terrible standard dataform wizard which is in the items?

Cor

"One Handed Man ( OHM - Terry Burns )bl...
What he is asking for Cor, I think is a Data Enabled form with some record selectors at the bottom to allow you to scan through some records, is this right Doug ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
Doug,

Difficult to answer for me, because I do not know what is an Access like continuous form.

However you wrote that you thought of building dynamicly textboxes and

this
does the same.

Cor

"Doug Bell" <dug@bigpond>
..
> Thanks Cor.
>
> Is that the way you would tackle the requirement of creating an Access > like
> continuous form?
>
> "Cor Ligthert" <no************@planet.nl> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
>> Dough,
>>
>> See this sample I once made, it looks in my opinion that it can help

with
>> your question.
>> You will have to use textboxes of course instead of buttons.
>>
>> I hope this helps?
>>
>> Cor
>>
>> \\\You can paste it directly in a created project code
>> Private Sub Form1_Load(ByVal sender As Object, _
>> ByVal e As System.EventArgs) Handles MyBase.Load
>> Dim start As Integer = 4
>> Dim top As Integer = 25
>> Dim i As Integer
>> Dim nowdate As DateTime = DateTime.Now
>> Dim mybutton(System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month)) As Button
>> For i = 0 To System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month) - 1
>> mybutton(i) = New Button
>> mybutton(i).TextAlign = ContentAlignment.MiddleCenter
>> mybutton(i).Width = 40
>> mybutton(i).Height = 20
>> mybutton(i).FlatStyle = FlatStyle.Flat
>> mybutton(i).BackColor = Drawing.Color.AntiqueWhite
>> mybutton(i).Location = New System.Drawing.Point(start,
>> top)
>> mybutton(i).Text = (i + 1).ToString
>> mybutton(i).Cursor = Cursors.Hand
>> Me.Controls.Add(mybutton(i))
>> AddHandler mybutton(i).Click, AddressOf mybutton_Click
>> AddHandler mybutton(i).MouseHover, AddressOf

mybutton_Hoover
>> AddHandler mybutton(i).MouseLeave, AddressOf
>> mybutton_Leave
>> start = start + 40
>> If (i + 1) Mod 5 = 0 Then
>> top = top + 20
>> start = 4
>> End If
>> Next
>> End Sub
>> Private Sub mybutton_Click _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> MessageBox.Show("The day is: " & thisbutton.Text)
>> End Sub
>> Private Sub mybutton_Hoover _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AliceBlue
>> End Sub
>> Private Sub mybutton_Leave _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AntiqueWhite
>> End Sub
>> ///
>>
>>
>>
>
>



Nov 21 '05 #9

P: n/a
OK, I see. Well, ASP.NET's repeater wont really do what you need.

There is no obvious way to replicate the functionality of Access's
Continuous forms AFAIK.

I am interested to know why it is important to emulate this functionality or
is it that you simply liked the feauture and would like to replicate it.
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Doug Bell" <dug@bigpond> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Hi Terry,
Not exactly.

Access allows you to define a form as a continuous form. You then place
controls on the form and bind them to fields of a recordset.
When you open the form it displays the controls with the data from the first record and then repeats a copy of all the controls populated with data from the second record and so on to the end of the page. The scroll bar allows
you to scroll down through the record set.
It is like a data grid except that each row does not have to be in line,
each field is in a separate control (text box or check box etc) and all
those controls are repeated.

The code that Cor provided could be the base of a similar looking form
developed in Dot Net. I have done something similar in VB but I was thinking that possibly there was an easier way in Dot Net. I think ASP.Net provides a repeater (?) that might do something similar.

Thanks for the replys.

Doug

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:ep**************@TK2MSFTNGP10.phx.gbl...
What he is asking for Cor, I think is a Data Enabled form with some record
selectors at the bottom to allow you to scan through some records, is this right Doug ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
Doug,

Difficult to answer for me, because I do not know what is an Access like continuous form.

However you wrote that you thought of building dynamicly textboxes and

this
does the same.

Cor

"Doug Bell" <dug@bigpond>
..
> Thanks Cor.
>
> Is that the way you would tackle the requirement of creating an Access > like
> continuous form?
>
> "Cor Ligthert" <no************@planet.nl> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
>> Dough,
>>
>> See this sample I once made, it looks in my opinion that it can
help with
>> your question.
>> You will have to use textboxes of course instead of buttons.
>>
>> I hope this helps?
>>
>> Cor
>>
>> \\\You can paste it directly in a created project code
>> Private Sub Form1_Load(ByVal sender As Object, _
>> ByVal e As System.EventArgs) Handles MyBase.Load
>> Dim start As Integer = 4
>> Dim top As Integer = 25
>> Dim i As Integer
>> Dim nowdate As DateTime = DateTime.Now
>> Dim mybutton(System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month)) As Button
>> For i = 0 To System.DateTime.DaysInMonth _
>> (nowdate.Year, nowdate.Month) - 1
>> mybutton(i) = New Button
>> mybutton(i).TextAlign = ContentAlignment.MiddleCenter
>> mybutton(i).Width = 40
>> mybutton(i).Height = 20
>> mybutton(i).FlatStyle = FlatStyle.Flat
>> mybutton(i).BackColor = Drawing.Color.AntiqueWhite
>> mybutton(i).Location = New System.Drawing.Point(start,

top) >> mybutton(i).Text = (i + 1).ToString
>> mybutton(i).Cursor = Cursors.Hand
>> Me.Controls.Add(mybutton(i))
>> AddHandler mybutton(i).Click, AddressOf mybutton_Click
>> AddHandler mybutton(i).MouseHover, AddressOf

mybutton_Hoover
>> AddHandler mybutton(i).MouseLeave, AddressOf mybutton_Leave >> start = start + 40
>> If (i + 1) Mod 5 = 0 Then
>> top = top + 20
>> start = 4
>> End If
>> Next
>> End Sub
>> Private Sub mybutton_Click _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> MessageBox.Show("The day is: " & thisbutton.Text)
>> End Sub
>> Private Sub mybutton_Hoover _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AliceBlue
>> End Sub
>> Private Sub mybutton_Leave _
>> (ByVal sender As Object, ByVal e As System.EventArgs)
>> Dim thisbutton As Button = DirectCast(sender, Button)
>> thisbutton.BackColor = Drawing.Color.AntiqueWhite
>> End Sub
>> ///
>>
>>
>>
>
>



Nov 21 '05 #10

P: n/a
Terry,
I am rewriting a tiered Access solution that buffers data from an IBM AS400
to provide availability when it does its end of day processing. They want
the User Interface to not change.
It does present the data well!

I will attempt to build and populate the text boxes on the fly and see what
sort of performance I can get.

Doug
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
OK, I see. Well, ASP.NET's repeater wont really do what you need.

There is no obvious way to replicate the functionality of Access's
Continuous forms AFAIK.

I am interested to know why it is important to emulate this functionality or is it that you simply liked the feauture and would like to replicate it.
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Doug Bell" <dug@bigpond> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Hi Terry,
Not exactly.

Access allows you to define a form as a continuous form. You then place
controls on the form and bind them to fields of a recordset.
When you open the form it displays the controls with the data from the first
record and then repeats a copy of all the controls populated with data

from
the second record and so on to the end of the page. The scroll bar allows
you to scroll down through the record set.
It is like a data grid except that each row does not have to be in line,
each field is in a separate control (text box or check box etc) and all
those controls are repeated.

The code that Cor provided could be the base of a similar looking form
developed in Dot Net. I have done something similar in VB but I was

thinking
that possibly there was an easier way in Dot Net. I think ASP.Net provides a
repeater (?) that might do something similar.

Thanks for the replys.

Doug

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message
news:ep**************@TK2MSFTNGP10.phx.gbl...
What he is asking for Cor, I think is a Data Enabled form with some

record selectors at the bottom to allow you to scan through some records, is this right Doug ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
> Doug,
>
> Difficult to answer for me, because I do not know what is an Access like > continuous form.
>
> However you wrote that you thought of building dynamicly textboxes and this
> does the same.
>
> Cor
>
> "Doug Bell" <dug@bigpond>
> ..
> > Thanks Cor.
> >
> > Is that the way you would tackle the requirement of creating an Access > > like
> > continuous form?
> >
> > "Cor Ligthert" <no************@planet.nl> wrote in message
> > news:%2****************@TK2MSFTNGP09.phx.gbl...
> >> Dough,
> >>
> >> See this sample I once made, it looks in my opinion that it can help with
> >> your question.
> >> You will have to use textboxes of course instead of buttons.
> >>
> >> I hope this helps?
> >>
> >> Cor
> >>
> >> \\\You can paste it directly in a created project code
> >> Private Sub Form1_Load(ByVal sender As Object, _
> >> ByVal e As System.EventArgs) Handles MyBase.Load
> >> Dim start As Integer = 4
> >> Dim top As Integer = 25
> >> Dim i As Integer
> >> Dim nowdate As DateTime = DateTime.Now
> >> Dim mybutton(System.DateTime.DaysInMonth _
> >> (nowdate.Year, nowdate.Month)) As Button
> >> For i = 0 To System.DateTime.DaysInMonth _
> >> (nowdate.Year, nowdate.Month) - 1
> >> mybutton(i) = New Button
> >> mybutton(i).TextAlign = ContentAlignment.MiddleCenter
> >> mybutton(i).Width = 40
> >> mybutton(i).Height = 20
> >> mybutton(i).FlatStyle = FlatStyle.Flat
> >> mybutton(i).BackColor = Drawing.Color.AntiqueWhite
> >> mybutton(i).Location = New System.Drawing.Point(start, top)
> >> mybutton(i).Text = (i + 1).ToString
> >> mybutton(i).Cursor = Cursors.Hand
> >> Me.Controls.Add(mybutton(i))
> >> AddHandler mybutton(i).Click, AddressOf

mybutton_Click > >> AddHandler mybutton(i).MouseHover, AddressOf
mybutton_Hoover
> >> AddHandler mybutton(i).MouseLeave, AddressOf

mybutton_Leave
> >> start = start + 40
> >> If (i + 1) Mod 5 = 0 Then
> >> top = top + 20
> >> start = 4
> >> End If
> >> Next
> >> End Sub
> >> Private Sub mybutton_Click _
> >> (ByVal sender As Object, ByVal e As System.EventArgs)
> >> Dim thisbutton As Button = DirectCast(sender, Button)
> >> MessageBox.Show("The day is: " & thisbutton.Text)
> >> End Sub
> >> Private Sub mybutton_Hoover _
> >> (ByVal sender As Object, ByVal e As System.EventArgs)
> >> Dim thisbutton As Button = DirectCast(sender, Button)
> >> thisbutton.BackColor = Drawing.Color.AliceBlue
> >> End Sub
> >> Private Sub mybutton_Leave _
> >> (ByVal sender As Object, ByVal e As System.EventArgs)
> >> Dim thisbutton As Button = DirectCast(sender, Button)
> >> thisbutton.BackColor = Drawing.Color.AntiqueWhite
> >> End Sub
> >> ///
> >>
> >>
> >>
> >
> >
>
>



Nov 21 '05 #11

P: n/a
On Thu, 30 Sep 2004 16:51:04 +1000, "Doug Bell" <dug@bigpond> wrote:

Hi,
I am trying to create form that displays data like an Access continuous
dataform rather than using a data grid.

I am thinking that I can achieve this by creating a row of text boxes, one
for each field I need to display. The creating a controls array for the
first n records I show and populate the text boxes. Then setting up a
vertical scroll bar for the number of records in the data table.

As the scroll bar is clicked or dragged, I will need to recreate the
controls array for each record/field.

Is there any easier way to achieve this result?


Nothing built in to .NET however there is a product that will generate continuous forms from an
Access database project:

http://www.evolutionsoft.co.uk/about.htm

Some third-party Grid controls may support this feature as well.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.