Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old July 18th, 2005, 08:09 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey Raghavendra_Mudugal, do you have any examples that demonstrate on how an application can do select queries with user input? i apologise for being this brief but im not very familiar at how applications like these should work. was wondering if you'd be interested if i gave an overview. thank you.

Reply With Quote
  #12 (permalink)  
Old July 18th, 2005, 11:19 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/querydb.zip

Unzip it and it contains a is access2000 version
database. In the query tab there are two queries
that shows how to get the data from the user input.
Double click on them and a small window appears
and type something in and see the output on the
specific input.

Hope this helps

With Regards,
Raghavendra Mudugal
Reply With Quote
  #13 (permalink)  
Old July 19th, 2005, 08:58 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey Raghavendra Mudugal, i've looked at the file and the queries. do you think they can be added into forms using vba or are there any simpler ways to do so? thanks! that was cool by the way.

Reply With Quote
  #14 (permalink)  
Old July 19th, 2005, 09:04 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oh i was trying to capture a String from a textfield to be displayed as the label of the next form but it didn't work. here's a look at it.

'criteria textfield form
crtf = String(Text6.Text)

'display on next form
r.Text = Str$(crtf)

do you think the syntax is correct?
sorry to bug you so much.
thanks Raghavendra Mudugal

Reply With Quote
  #15 (permalink)  
Old July 20th, 2005, 12:30 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_...l/querydb1.zip

open that database after unzipping it. Goto to forms
section, It contains 3 forms
Form1 -> tells to call those queries from the query
Form2 -> shows how to pass a string to next form
Form3 -> shows that string in a label that you type
in the textbox of the form2.

Hope this helps


With Regards,
Raghavendra Mudugal
Reply With Quote
  #16 (permalink)  
Old July 21st, 2005, 01:50 AM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey Raghavendra Mudugal, i've been trying on the textfield input and label caption part. here's a look at the codes (outlined)

Private Sub Command11_Click()
On Error Resume Next
DoCmd.OpenForm "Conditions", acDesign
Dim obj As TextBox
Dim obj1 As Object
Dim iTop As Integer
Dim iNum As Integer

Rem New Code
Dim x As Integer
x = Forms("Conditions").Controls.Count
For z = 1 To x Step 1
    Set obj1 = Forms("Conditions").Controls.Item(z)
    If TypeOf obj1 Is TextBox Then
        Forms("Conditions").Controls.Application.DeleteCon trol "Conditions", "objTxtbx" & z
    End If
Next
Rem End New Code

iNum = CInt(Forms("NewProject").Controls("Text6"))
iTop = 800
For i = 1 To iNum
    Rem Forms("Conditions").Controls.Application.DeleteCon trol "Conditions", "objTxtbx" & i
    Set obj = Forms("Conditions").Controls.Application.CreateCon trol("Conditions", acTextBox, acDetail, , , 200, iTop)
    obj.Name = "objTxtbx" & i
    iTop = iTop + 500
Next
DoCmd.Save acForm, "Conditions"
DoCmd.OpenForm "Conditions", acNormal

---------------------------------------------------------
saName = Text6
DoCmd.OpenForm ("Conditions")
Forms("Conditions").Controls("Label58").Caption = saName
---------------------------------------------------------
End Sub

most likely i'm adding it in the wrong manner. hoping if you could advise me on this? thank you very much.

Reply With Quote
  #17 (permalink)  
Old July 21st, 2005, 11:53 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/db5.zip

Actually the Label Name "Label58" to which you are
assigning the caption, make sure that label is
added manually by you opening the "Conditions" form.

Because what the code i have given to you only addes the
textboxes and not labels. So you have to add that
"Label58" manually.

If you want those labels added by logically then, look
in that link db5.zip and it contains that same database
and i changed the code. It even adds the label left
beside the text box and assigs the caption to it.

I guess i have understood your previous doubt and done
this. please check and let me know, and sorry for not
replying soon.

Hope this helps.

With Regards,
Raghavendra Mudugal
Reply With Quote
  #18 (permalink)  
Old July 24th, 2005, 09:43 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Raghavendra Mudugal, please do not worry for not replying soon. i can't thank you enough for being so helpful. =)

by adding Label58 manually, do you mean writing codes to add the label (not using the command button function from toolbox) or writing codes for the label in the current form to be added into the next form?

i am actually on internship this semester and my lecturer has assigned me to work on this office project which, i have no experience on.

it is an application which allows the user to determine the type and number of conditions to short-list a group of suitable candidates from several names database (tables).

the shortlisted candidates will then be sent (automatically) a questionaire attachment which the user (admin staff) has prepared.

i am quite worried because i know too little about vba and i do not have enough time to learn from scratch. my lecturer has advised me to look at the specific requirement and work on it (instead of trying to understand it from start) also my lecturer himself is not vba inclined.

here is a screen capture of the forms:
http://zevzda.blogs.friendster.com/p...t/screen_1.JPG

thanks for helping me all these while =)

Reply With Quote
  #19 (permalink)  
Old July 24th, 2005, 11:30 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,

Actually I mean about adding that "Label58" is through by
opening the form in the design view and from tool-box
click the label and add it on the form and place it
exactly you want it to be.

And In db5.zip i have already written the code for adding
the label through the code.

Because, the project you are handling now, i can help. But
it all depends on how good you have understood the concept
of the project that it has been assigned to you.
In programming until and unless you understand it very clearly,
no matter how simple the problem may be, it still a big and
difficult problem.

Please try to understand the things to be done and let me know
what exactly you need. Take it stage be stage dont take it
all at once.



With Regards,
Raghavendra Mudugal
Reply With Quote
  #20 (permalink)  
Old July 25th, 2005, 03:05 AM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Raghavendra Mudugal, i did try adding Label58 the way you have mentioned but it automatically gets removed.

could it be that Command11_Click() already handling 'specifying of number of textfields' (on another form 'Conditions') now requires to handle the 'textfield-to-label caption (which also opens in the same form named 'Conditions')?

or is it suppose to work?

thanks for the advice =) i will learn and understand what is required well.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.