Hi, just comment on Q2, "modify the database field property like size during run time" is not a recommended way to handle data. Design database in the way that the fields can handle all possiblity of data entered.
Main Topics
Browse All Topics1. How can i create a form with embeded coding i wish to have during run time using VB?
2. How can i modify the database field property like size during run time or using SQL statement?
please attach sample coding for further reference if possible
Thanks
Hi,
Thanks for your respone. Below is the detail of problems that i'm facing now,
I'm been ask to come out with some sort of program that can let the end user create their own form for data entry process, which is iniatially a copy of another existing form. For example, said we have a fully functional Inventory Stock-In Master form, now my task is to transfer this form to another form(including the functional code), said Invwentory Stock-Out Master form, which should have the facilities that let the end user to customize the new form like modifying the database table used by this new form, add/modify the existing control(like textbox and label) that the new form have and etc.The conclusion is my program must be generic enought to transform a existing form to anything related and MUST functional to used.
I hope you can understand what i'm trying to said and provided me with some guideline, and possible with a working example to achieve this task, Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here is an overview of one possible way...
Create one of each type of control you might be interested in (textbox, label, checkbox, etc) and set the index property to zero. Set the visible property to false.
Read a file that tells you what controls you want. For example, here is a comma delimited file but you would probably want to use something a bit more elegant.
"textbox", "100", "200", "30", "PhoneNumber"
(type of control, x pos, y pos, len, name)
In your code you could process it something like...
if (strControlType = "textbox") then
AddTextbox strTag, lngX, lngY, lngMaxLen
end if
Private Sub AddTextbox(Tagname As String, x as long, y as long, MaxLen as long)
Dim lngUBound As Long
lngUBound = txtAdditionalInfo.UBound + 1
Load txtAdditionalInfo(lngUBoun
With txtAdditionalInfo(lngUBoun
.Visible = True
.Left = 0
.Top = m_lngYPos
.Tag = Tagname
End With
End Sub
This will give you the ability to dynamically create controls and place them on your form. Rather than have the X and Y coordinates specified you may prefer to have your program locate the controls for you going from left to right until there is no more room on that row and advancing to the next row, much like Java does.
When it comes time to save the user input you could iterate through the controls and create one long string containing all of the responses. XML would be a good candidate for this. Rather than trying to dynamically alter your database layout, consider creating one column that would store the entire XML string.
As far as writing code to go "behind" the controls, I can't think of a really good solution but I would bet you would end up putting it into a DLL rather than your app.
This isn't all-inclusive by any means as the total solution would be way too large for this forum but perhaps this will give you some ideas.
Business Accounts
Answer for Membership
by: glass_cookiePosted on 2001-06-02 at 10:51:35ID: 6149036
Hi!
Could you elaborate a little more on the embedded coding part? Maybe I could help on that. FYI, I don't touch on databases. So, I'll only be able to help Qn.1
That's it!
glass cookie : )