Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assigning the value of a variable from a text box...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00751637
Message ID:
00751656
Views:
14
>I know this question has an incredibly simple answer but I'm claiming newbie so here goes...
>
>We have an application that produces a report based on a part number which is hard-coded in a program file of the project. At the beginning of the code is a simple statement that says myFilter = "partnumber" and then goes from there. If I leave a few characters off the end of the part number it inclusively selects and prints reports for all parts that fall it can create a match.
>
>Since all user requests are brought to me to run this report I want to create a simple one-textbox form that users can enter this information into, run their own reports (and quit bugging me). I'll call the textbox txtPart.
>
>On a form, I've included a textbox to accept the input and a command button to run the program file.
>
>In the "click" event of the button I've placed the following...
>
>myFilter = thisform.txtPart.Value
>
>go (program name)
>
>However the value typed in is never connected with the variable. What am I missing here?
>
>FYI I am using version 5. It looks like there is in input box feature on newer versions but I don't think I have it yet.
>
>Thanks!
>
>Alan

Alan;

You might try something quick and dirty making myfilter a Private Variable

So declare:
Private myfilter

myFilter = thisform.txtPart.Value

Do  (program name)
I can think of better ways to do it but try what you have first.

Tom
Previous
Reply
Map
View

Click here to load this message in the networking platform