 |
| Access VBA Discuss using VBA for Access programming. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA 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
|
|
|
|

February 7th, 2006, 12:20 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
This would appear to be the last word:
Quote:
|
quote:A running form can not change its own design - even by closing itself & then
|
Quote:
reopening itself in Design view. Your only option is to pre-allocate a
suitable number of controls, set them invisible at design time, then change
the propeties at runtime to make them appear as required.
|
Scooped it off another forum.
Bob
|
|

February 7th, 2006, 01:11 PM
|
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
So , if i can't change the form not in design view ,
Can i attach event to deleting of row in table or adding new row ?
|
|

February 7th, 2006, 01:32 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
Do you mean a table bound to a form, that is, a Form using the table as its record source?
|
|

February 7th, 2006, 01:51 PM
|
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
No , i mean just Table row - if it is being changed - i want to attach to this event (like trigger) that will handle some things that i want - like adding the row data to form .
|
|

February 7th, 2006, 02:14 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
Access tables have no support for triggers, and the VBA event model requires that event handlers exist in code modules (associated with either forms or reports, or custom class modules). TableDef objects do not have code modules associated with them, and therefore can't publish events. They would have to be bound to forms or reports, enabling you to fire form or report events, or maipulated in code (using DAO or ADO) in a class module with defined custom events.
|
|

February 7th, 2006, 03:16 PM
|
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ok , first at all - thanks that you replied to my questions .
But now i implemented what i want in different way :
Form using wizard that reads records from table .
Now i have another question :
i have textBox that has specific control source .
But the problem is that when i change it's content - it changes only the textBox (within the many textboxes) that has the focus . How can i do that it changes all the textBoxes of that control?
(The text boxes arranged in regular table)
|
|

February 7th, 2006, 03:35 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
Don't follow. Are you saying that when you type a new value in the textbox that has the focus, you want all the other textboxes on the form to be set to that value as well?
|
|

February 7th, 2006, 03:57 PM
|
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I mean that there are few text-boxes in Detail view , each of them has it's own control source from specific table - and when i open to see the form - there are few rows of that text-boxes which contain different values - but each text box in a column come from 1 control . I want that when i change one value in column in text-box(in form) - all the text boxes in that column will change (Delete in my case) .
|
|

February 7th, 2006, 05:25 PM
|
|
Authorized User
|
|
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
OK , i found temporary solution to the problem :
i just updated database with DoCmd.RunSql
but the only problem with this is the ugly prompt that i don't want to be seen . How do i get rid of this prompt?
|
|

February 8th, 2006, 10:17 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
|
|
DoCmd.SetWarnings False
....your code
DoCmd.SetWarnings True
|
|
 |