Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
| Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 10th, 2005, 08:42 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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. :)

  #2 (permalink)  
Old July 11th, 2005, 12:15 AM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #3 (permalink)  
Old July 12th, 2005, 10:38 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
:)

  #4 (permalink)  
Old July 12th, 2005, 11:48 PM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #5 (permalink)  
Old July 12th, 2005, 11:51 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #6 (permalink)  
Old July 13th, 2005, 09:18 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

  #7 (permalink)  
Old July 13th, 2005, 11:01 PM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #8 (permalink)  
Old July 14th, 2005, 01:17 AM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

  #9 (permalink)  
Old July 14th, 2005, 01:27 AM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #10 (permalink)  
Old July 14th, 2005, 02:43 AM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update query: Editing phone number fields? monacle Access 2 February 27th, 2007 08:55 AM
Combining Text Fields lizhaskin Access VBA 1 May 1st, 2006 06:15 AM
Calculating text fields jayman Classic ASP Basics 13 March 6th, 2006 05:27 AM
MySQL Text Fields MAtkins General .NET 0 May 27th, 2005 03:17 PM
variable number of fields in record manisha.anand Oracle 0 July 1st, 2004 05:00 PM





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