Wrox Programmer Forums
|
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
 
Old February 7th, 2006, 12:20 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

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


 
Old February 7th, 2006, 01:11 PM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 ?

 
Old February 7th, 2006, 01:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Do you mean a table bound to a form, that is, a Form using the table as its record source?

 
Old February 7th, 2006, 01:51 PM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 .

 
Old February 7th, 2006, 02:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

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.

 
Old February 7th, 2006, 03:16 PM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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)

 
Old February 7th, 2006, 03:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

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?

 
Old February 7th, 2006, 03:57 PM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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) .

 
Old February 7th, 2006, 05:25 PM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

 
Old February 8th, 2006, 10:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

DoCmd.SetWarnings False
....your code
DoCmd.SetWarnings True









Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding controls to a form Scootterp Access VBA 2 August 4th, 2009 02:32 PM
Adding Controls Dynamically andyj00 C# 0 March 19th, 2007 08:54 AM
Adding Constituent Controls AGS BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 1 December 12th, 2005 06:32 AM
Adding controls to C# clojinted General .NET 1 February 12th, 2005 03:17 PM
Dynamically Adding Controls - Error pagates Excel VBA 1 August 28th, 2003 01:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.