473,406 Members | 2,698 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,406 software developers and data experts.

CreateForm help

I want to create a form dynamically using the createform method. The
form's record source is a query. I want to make the form continuous and
in tabular format...... and I also want to automatically put the fields
from the record source in the form.... If one were to do this using the
form wizard, this what I want to accomplish.

Thanks

Oct 26 '06 #1
3 2519

jjp3...@wowway.com wrote:
I want to create a form dynamically using the createform method. The
form's record source is a query. I want to make the form continuous and
in tabular format...... and I also want to automatically put the fields
from the record source in the form.... If one were to do this using the
form wizard, this what I want to accomplish.

Thanks
Try this.

Private Sub Form_Template_Click()

Dim frm As Form

'Create a new form based on the XXXXX form
Set frm = CreateForm(, "existing_form")
DoCmd.Restore

'Set RecordSource property to inputQuery query
frm.RecordSource = "YourInputQuery"

End Sub

Oct 26 '06 #2

Tanis wrote:
jjp3...@wowway.com wrote:
I want to create a form dynamically using the createform method. The
form's record source is a query. I want to make the form continuous and
in tabular format...... and I also want to automatically put the fields
from the record source in the form.... If one were to do this using the
form wizard, this what I want to accomplish.

Thanks

Try this.

Private Sub Form_Template_Click()

Dim frm As Form

'Create a new form based on the XXXXX form
Set frm = CreateForm(, "existing_form")
DoCmd.Restore

'Set RecordSource property to inputQuery query
frm.RecordSource = "YourInputQuery"

End Sub
Oct 26 '06 #3

Tanis wrote:
jjp3...@wowway.com wrote:
I want to create a form dynamically using the createform method. The
form's record source is a query. I want to make the form continuous and
in tabular format...... and I also want to automatically put the fields
from the record source in the form.... If one were to do this using the
form wizard, this what I want to accomplish.

Thanks

Try this.

Private Sub Form_Template_Click()

Dim frm As Form

'Create a new form based on the XXXXX form
Set frm = CreateForm(, "existing_form")
DoCmd.Restore

'Set RecordSource property to inputQuery query
frm.RecordSource = "YourInputQuery"

End Sub


I tried this but in the end when the above code is run, I get a blank
form with the field list box showing, which I'm assuming it's asking me
to drag the field onto the form. Any idea of how I can 'drag' the field
onto the form automatically ?

Thanks

Oct 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
10
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
1
by: MLH | last post by:
Dim frm As Form Set frm = CreateForm In the 2nd line above, suppose I want to refer to an existing saved form rather than to create a new one. What would the Set syntax be to refer to an...
2
by: jjp3308 | last post by:
What I want to do is dynamically create a form based on a query and just the like the form wizard, have the fields from the query automaticlly appear on the form. Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.