473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Continuous Data Form

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
11 3525
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Prakash Wadhwani | last post by:
Is there any EASY way to highlight a full row in a continuous form so that as i navigate up & down the table/continuous form using the arrow keys, the entire line (all fields) get highlighted ? ...
3
by: Damian | last post by:
Hi. Is there a way to programatically populate a continuous form? I have an array of descriptions that I want to display in the continuous form and I have a textbox on the form called...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
3
by: Richard Hollenbeck | last post by:
I have the following query in my form's code: Private Function Get_Data(fieldNum As Integer) Dim strSQL As String Dim db As DAO.Database Dim rs As DAO.Recordset strSQL = "SELECT & "", "" & ...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
3
by: DavidB | last post by:
I have a Snapshot Control in a continuous form and I want the source for the control to be different for each instance of the continuous data (based on one of the fields in the recrod source for...
20
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of...
1
by: tizmagik | last post by:
I have a combobox on a continuous form that has a recordsource that is set upon Form_Load event via VBA (based on initial form data and external form data entered). For data entry purposes the...
7
by: Dave | last post by:
Hello All, These one may be a bit tricky, and what I'd like to do may not even be possible. I would love to hear any ideas you guys have for solving this. Here is the situation: I have a form...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.