Been Tinkering with this question. I don't want to create another form because that would be a waste of space (not that it matters) but it wouldn't be the correct way to go about it.
I am working on a function (I think?) and I want to tell a command button which form to show.
So I need to modify what happens when the cmd_click() event is fired. I'm thinking writing, flow charting, and my head is hurting. I've tried coming up with some code but its not working.
I really hope Modules are much easier than this. I haven't successfully been able to run a module (other than pre-canned [long] code)
Should they really let a DJ/Webmaster use VB6?
If I think VB6 is hard what about C++! Trust me been there, gave up after hello world.
So all you need to do is show a certian form when a command button is clicked? Or do you want to create the form from scratch when the command button is clicked? Can you give us more info so we can help.
As for C++ - been there, done that, can't get the smell out of my head.
I'm hopping that's a bad smell. I remember being much more of a noobie than I am now. (Hard to picture eh). And I remember that if I clicked on a checkbox it had to be validated and pointers and oh my gosh I don't know what the heck I'm talking about but it seems like C++!
Marty. That could work but I want lets say in my code. Someone pushes modify contact. The SelectContact form would show.
If I add a task, I need to select a contact for that task. Select Contact. What I need to do is either close / open a form and input a value on the new task screen so when I input it into mysql it works all fine and dandy and everything is referenced correctly.
I want to show my office the beta by the end of the week, b/c we could really use this app. Nothing on the market (for free) like it in fact I haven't seen much of anything like it.
When you say for example "User clicks modify contact (Select.jpg) and select client pops up", are you saying that that already happens and you want to change what happens, or that nothing happens now when you click modify contact and you want select client to pop up?
> nothing happens now when you click modify contact and you want select client to pop up?
No No No.. That code works fine.
I want two different types of things to happen from that form, but different actions to be performed depending on where you click the command button to show Select.JPG (Select Contact)
Senario 1:
User Clicks it within New Task...
what's to happen:
Allows you to select a contact, and then return the value of the listview box. (Unload both forms on completion) The Unload part is not a problem.
Senario 2:
User Clicks Modify Contact of the Main Screen.
What's to Happen:
Select Contact Box appears. It will take you into a modify contact screen and have the values populated already.
(Parts in Italics I can cover as soon as solution is solved, on my own time)
I do like your code on the Action Flag. I WILL need to incorperate something like that. The title was of modules. So that was something I didn't think of. But Yeah, how would I declare the variable from the command button pressed. I would need a function to declare which action flag is being used correct?
If you declare ActionFlag in a module, you can set it and read it from anywhere.
Just set it depending on what form is shown, or which button is pressed. You may need a few other choices, or even another flag. You might be able to set the .tag value of a form to show where the keypress came from
That's another thing. I've never sucessfully been able to write to the tag property on runtime, You think it would be easy as formname.Tag but it won't write. This is after the form is set to show. so