I forgot to say, I also think the problem may have been that I did not specify the form name as the parent for the new textbox control.
I changed two things at once, so I really didn't isolate the problem.
But it works
Well, I finally got it to work.
I took the code out of the form and added it to a module and it worked.
Here is the code I used
Sub NewControlstable1()
Dim frm As Form
Dim ctlLabel As Control, ctlText As Control
Dim intDataX As Integer, intDataY As Integer
Dim intLabelX As...
Well, I tried it on a new computer with a new database in version 2003 and I get the same error message. This time I get the error message, "can't find field5"
Before I was getting, "can't find field13" then I got the error message "can't find field14" with my first application.
Oh well...
this line is giving me the code
Set ctrltext = CreateControl("Table1", acTextBox, acDetail, "", "field4")
I'm currently working on Access 2002, maybe I need to switch to Access 2003 and try it.
Hi, I already opened the form in design mode, see above code,
but I keep getting the error message "Run-time error '3799' Could not find Field 'Text14' "
My code is the first code (the second code is just some generic code that works for new forms - it was an example from Microsoft)
Thanks,
what is the one line code to check what data type a textbox control on a form is?
I need to find out if a control is a textbox and if so, if this textbox data type is a long integer.
Any help would be appreciated.
How can I add a field to an existing form NOT a newly created form using VBA?
I currently have VBA code creating a new field in a table.
This table has an associated form.
I want this newly created table field to also appear in the form automatically through vba.
I tried to create a control...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.