473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to to create a form from dynamically created controls?

If you're into that maybe you could help me with another thing I'm upto now:

I succeeded in dynamically creating the controls but now I'm trying to dynamically create a form for these controls(to be linked to Me.Subform). But I can't find a way to refer to the form using a form name String parameter (subformSource in the code below).
All the docmd below except the first one which is not with paramter give me errors that the form doesn't exist/ closed. I also tried Application and that didn't work either.

Expand|Select|Wrap|Line Numbers
  1. 'create tempResults form
  2.     Set tempResults = CreateForm
  3.     With tempResults
  4.         .Caption = ""
  5.         .AllowFormView = True
  6. ...
  7.  
  8. End With
  9.         subformSource = "tempResults"
  10.  
  11.     'Open the subform source form in design view
  12.     DoCmd.OpenForm tempResults.Name, acDesign, , , acFormEdit, acHidden
  13.     'DoCmd.OpenForm subformSource, acDesign, , , acFormEdit, acHidden
  14.     'DoCmd.OpenForm CurrentProject.AllForms(subformSource).Name, acDesign, , , acFormEdit, acHidden
thanks
Mar 1 '11 #1
1 2200
TheSmileyCoder
2,322 Expert Mod 2GB
Honestly, im not sure, but I would try:
Expand|Select|Wrap|Line Numbers
  1. docmd.Save acForm, "Frm_Name"
  2. DoCmd.OpenForm "frm_Name", acDesign, , , acFormEdit, acHidden 
Mar 1 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Gelios | last post by:
Hello all! I have a Windows.Forms code where I dynamically created controls. How can I access to properties from event handler? For example: createSomeControls() { TextBox textBox = new...
0
by: AJP | last post by:
I have a child window which does the following after a button is pressed: Response.Write("<script>window.opener.__doPostBack('','');</script>"); but I get the following uncaught exception upon...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am have facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
5
by: Amelyan | last post by:
How can I get state of dynamically created controls (RadioButton, CheckBox, TextBox.Text) on post back when I click submit button? The only way I know is by traversing Response.Form enumberator;...
2
by: Nathan Sokalski | last post by:
I have several Button controls that I created dynamically that I need to handle the Click events for. How do I specify the event handler for dynamically created controls? Thanks. -- Nathan...
6
by: TB | last post by:
Hi All: I have this page where a rows / cells are programmatically added to to table by pushing a button. The rows contain a textbox and a associated button. What I want to is to be able to...
1
by: Grega | last post by:
Hi all, I am trying to create a VB smart device application. I create few buttons dynamically on form_load... something like this: Dim WithEvents BtnOperate As New...
2
by: Dica | last post by:
i've got a script that creates a new tablerow + tablecell and appends that to a non dynamically created table control. a new row is added for each recordset returned from my sql statement. within...
2
by: Dwight Johnson | last post by:
I am building a website in VS2005. I basically have one page, default.aspx, which contains placeholder objects into which I add various controls that are dynamically created. I have a dropdownlist...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.