Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 22nd, 2006, 05:21 AM
Authorized User
 
Join Date: Feb 2006
Location: , , .
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding text/controls from one form to another

Hi ,
I have 2 forms :
in one i hav 10 textboxes . Now i need that when i put a text in specific textbox then the text will appear in [u]right place second form</u> as text or textbox control , and when i delete from textbox in first form - this will delete text from the srcond form and other texts below will come up that no white-spaces will be in second form .
How can i implement this ?

Paula.

Reply With Quote
  #2 (permalink)  
Old February 24th, 2006, 10:10 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

If you have Form1 and Form2 with TextBox1, Textbox2, etc. then if you type in TextBox1 in Form1, you assign it to TextBox1 if Form2 like this in the textbox's After Update event:

Forms.Form2.Form.TextBox1 = Me.TextBox1

If you want textboxes in Form2 to disappear when empty, you'd put this instead of the above statement

If IsNull(Me.TextBox1) Then
    Forms.Form2.Form.TextBox1.Visible = False
Else
    Forms.Form2.Form.TextBox1.Visible = True
    Forms.Form2.Form.TextBox1 = Me.TextBox1
End If

But you also want to move up the other textboxes in Form2 if ones above them are empty. That is strange for a form. That's more something you do with reports, not forms.

The only way I can think of doing that is spacing each textbox a known and equal distance from the top. Then in a loop, you see how many textboxes are visible. Then set each visible textboxes position on the form using the .Height property.



Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding controls on vba form from an addin narendrapawar Pro VB 6 1 April 25th, 2010 04:59 PM
Adding controls to a form Scootterp Access VBA 2 August 4th, 2009 02:32 PM
Adding controls to a form based on data received jontheniceguy Visual Basic 2005 Basics 0 April 7th, 2006 10:07 AM
Adding Form controls in Datagrid (How to) chiefouko VS.NET 2002/2003 5 July 13th, 2004 12:24 AM



All times are GMT -4. The time now is 11:22 PM.


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