p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   VB How-To (http://p2p.wrox.com/forumdisplay.php?f=78)
-   -   specifying number of text fields (http://p2p.wrox.com/showthread.php?t=31357)

Astro July 10th, 2005 08:42 PM

specifying number of text fields
 
hello, can anyone shed some light on how to go about working on this.
i.e, user will be allowed to specify the number of textfield/s to be displayed in the next form. thank you very much. :)


Raghavendra_Mudugal July 11th, 2005 12:15 AM

Hello

Check this link

http://in.geocities.com/raghavendra_...ddControls.zip

It will show, how to specify the number of textboxes
and add them on the run-time to the second form.

I guess this is what you have asked.

Hope it helps

With Regards,
Raghavendra Mudugal

Astro July 12th, 2005 10:38 PM

thank you Raghavendra_Mudugal, i've checked out the link already. it's just as im looking for and i appreciate that alot. im having problem extracting the codes to fit into the form i have already created.

--------------------------------
Option Compare Database

Private Sub Command2_Click()
On Error GoTo Err_Command2_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "NewProject"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command2_Click:
    Exit Sub

Err_Command2_Click:
    MsgBox Err.Description
    Resume Exit_Command2_Click

End Sub
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Form2"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command3_Click:
    Exit Sub

Err_Command3_Click:
    MsgBox Err.Description
    Resume Exit_Command3_Click

End Sub

Private Sub Detail_Click()

End Sub

Private Sub Label0_Click()

End Sub
--------------------------------

the codes you have shown me are to be applied to Command2_Click().

getting a hang of this now.

thanks again Raghavendra_Mudugal.
:)


Raghavendra_Mudugal July 12th, 2005 11:48 PM

Hello Astro

Check this link
http://in.geocities.com/raghavendra_mudugal/db2.zip

Unzip this file, it contains a access2003 version
database. It contains two forms. when you open the
Form1 and when you click the command button, it opens
the Form2 and adds the Textboxs at the runtime (dynamically).

The code which i sent you previously it works with
VisualBasic not with the VBA. Here the syntax are bit
different.

I guess you needed this help with using VBA. In the above
code given by you to implement in the command2_click
event, i guess you want it in the MS-Access forms.

Open the form in the design view and check the onclick
event of that button. There you can see the code of
adding the controls and opening the form.

Hope this helps.

With Regards,
Raghavendra Mudugal

Astro July 12th, 2005 11:51 PM

hey Raghavendra_Mudugal, thank you so very much man! thanks.


Astro July 13th, 2005 09:18 PM

hey Raghavendra_Mudugal, the latest code you directed me to creates a predetermined number of textfields (5). can you guide me on how to process a numeric input which will then display the number of textfields specified. sorry to trouble you. thanks.


Raghavendra_Mudugal July 13th, 2005 11:01 PM

Hello Astro

Check this link
http://in.geocities.com/raghavendra_mudugal/db3.zip

Unzip it, its an database of access2003 version.

Here i have changed the code to accept the value from
the textbox (i.e how many you want) and click the
button that will adds number textboxes to the second
form.

Hope this helps.

With Regards,
Raghavendra Mudugal

Astro July 14th, 2005 01:17 AM

sorry for the trouble Raghavendra_Muduga, db3 did not seem to work. the number of textfields are static. it worked once the first time i ran it though.


Raghavendra_Mudugal July 14th, 2005 01:27 AM

Hello Astro

Check this link
http://in.geocities.com/raghavendra_mudugal/db4.zip

Sorry for my mistake. I have changed the code
and it is working for me here not only for the first time
but for all time.

Please check this and let me know.

Hope this helps

With Regards,
Raghavendra Mudugal

Astro July 14th, 2005 02:43 AM

got it Raghavendra_Mudugal, thanks so much for your help. don't worry bout earlier by the way. thanks!



All times are GMT -4. The time now is 07:30 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.