 |
06-17-2003, 04:05 PM
|
#1 (permalink)
| | Registered User
Join Date: Oct 2001 Location: perpetual delerium
Posts: 4,463
| » 
MS Access, how do I make one txt box = another
I'm making a program in access and I don't have till 5 to get this program working well. I have pretty much all the basics in place I just need to figure out how to get a text box in a form equal change the text of a report text box when I hit a button. Some vb would work.
[basic idea]
1.Formtxtbox = blank
2.Reporttxtbox = blank
3.(operator inserts text) formtxtbox = name of company
4.operator hits "save" button
5.Reporttxtbox = name of company
Then my prog saves it as an HTML or whatever but I got that worked out.
|
| |
06-17-2003, 04:15 PM
|
#2 (permalink)
| | Registered User
Join Date: Oct 2001 Location: TOO close to Wash DC
Posts: 7,955
|
If your report gets its data from a MS Access Query, then modify the query to popup a form asking the user for information
Create a form called "stuff" and a text box on the form called txtField
Then in the criteria for the field you want the information put '=stuff!txtField' so theoretically when you run the form that gets the data from the query, the query will popup the form prompting the user for information.
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
|
| |
06-17-2003, 04:40 PM
|
#3 (permalink)
| | Registered User
Join Date: Oct 2001 Location: perpetual delerium
Posts: 4,463
|
That would bugger up my current program. Is there a simple way to just make the report = the text in the txt fields of my form? Its only 9 fields that need to be copied to the report so it can be published as a .html file. I have that all setup so it publishes it decently. I just need to get this one part done by 5. Then I can rework it to be better after that.
__________________
stuff
|
| |
06-17-2003, 05:34 PM
|
#4 (permalink)
| | Registered User
Join Date: Oct 2001 Location: perpetual delerium
Posts: 4,463
|
could you expain your procedure more if its not possible to do what I'm saying? I'm banging my head against a wall right now, I just don't know how to express what I'm saying to the program.
__________________
stuff
|
| |
06-17-2003, 05:42 PM
|
#5 (permalink)
| | Registered User
Join Date: Nov 2001
Posts: 170
|
So basically you have a form set up for data entry, and you want the text boxes in your report to display the values that were input into the textboxes of the form? If that's the case why not just set the control source of the text boxes? Or am I missing the point entirely?
|
| |
06-17-2003, 05:56 PM
|
#6 (permalink)
| | Registered User
Join Date: Oct 2001 Location: perpetual delerium
Posts: 4,463
|
I'm a newb to this so I don't know about a lot of that stuff. Basicly yeah thats what I want to do, but how do I do it?
__________________
stuff
|
| |
06-17-2003, 06:11 PM
|
#7 (permalink)
| | Registered User
Join Date: Nov 2001
Posts: 170
|
I'm fairly new myself, so don't read too far into what I'm saying... But, I'm guessing you have a table for all of your values, and then the form for data input, and then the report to display some info? If that's right, then all you have to do bring up the properties for your form (right click in that grey square in the upper left corner of your form, go to data, then control source and select your table. Then go to your properties for your text box (right click on the text box) and go to data, then control source and then select which value you want the text box to be linked to. So now whatever you type into that text box will be saved as that value in that table, and any other text boxes that are set up with that same value as the control source, will also display that same value. I hope that made sense, and if it did I hope it's what you were looking for.
|
| |
06-17-2003, 06:37 PM
|
#8 (permalink)
| | Registered User
Join Date: Oct 2001 Location: perpetual delerium
Posts: 4,463
|
Yeah Turnip, that was exactly it! Now my program can have text inserted into the form text boxes which it then inputs to the tables for storing. Plus I have a button that I can press which takes all the tables and prints them into a pretty nice looking html file so me boss can see them all fairly easily. THANK YOU A TON
I have another question now though (sorry). While I can now do all that, it will only edit one line of the tables. How do I make it so I can, while in the form go one line down. I don't even need the text boxes in the forms cleared necisarrily. I just need to know how to make a button to do that so I can enter more then one set of information.
__________________
stuff
|
| |
06-17-2003, 07:04 PM
|
#9 (permalink)
| | Registered User
Join Date: Oct 2001 Location: perpetual delerium
Posts: 4,463
|
I figured it out myself!! WEEEEEE
Then I suddenly saw some buttons that had appeared at some point (not my doing) that did the same thing only better
But any way I talked to my boss and my export to HTML is out the window, so I guess its good to go except fine tuning and adding messages and errors and easter eggs. Thanks a ton everyone
__________________
stuff
|
| |
06-17-2003, 11:42 PM
|
#10 (permalink)
| | Registered User
Join Date: Nov 2001
Posts: 170
|
Sorry I didn't get back to you, but I'm glad you got it all worked out.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions  | | | | | Recent Discussions  | | | | | |