I am starting my own database and I want to make a form that is interactive, I just want to know how to make the data entered in the textbox transfer to the my database using a button using vba/sql code.
thank you so much in advance
I am starting my own database and I want to make a form that is interactive, I just want to know how to make the data entered in the textbox transfer to the my database using a button using vba/sql code.
thank you so much in advance
You set the form RecordSource property and set data controls ControlSource property. This is then a BOUND form with BOUND controls. No VBA/SQL needed. This is basic Access functionality. Have you completed an introductory tutorial book?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I might have skipped that part, thank you for letting me know..![]()
Just to expand on June7's response: Using Unbound Forms really does away with the basic function of Access, which is to facilitate RAD (Rapid Application Development) and should only be attempted by very experienced Access developers, and then only when/if a legitimate purpose requires it, and most situations don’t! You don't need Unbound Forms to
- Do Data Validation
- Prevent Duplicate Records
- Do Formatting of Data before it's Saved
- Decide whether or not to actually Save a New or Edited Record
which are the most common reasons given. Nor are they needed for another dozen reasons I've seen people give!
Several developers I know, experienced in Visual Basic database development and Access development, estimate that development, using Unbound Forms, by highly experienced developers, takes two to three times as long, using Unbound Forms, as it does when using Access and Bound Forms. That’s because with Bound Forms the Access Gnomes do the vast majority of the heavy lifting; with Unbound Forms the developer has to write code for everything...even the most mundane tasks!
Bottom line is…with Bound Forms you end up writing code for a few specialized situations, such as #1-#4, as listed above…and with Unbound Forms you have to write code for virtually everything that needs to be done!
If you insist on using Unbound Forms, you'd be far better off using a straight VB or C++ front end with a SQL Server or Oracle back end.
- You can create an EXE file which gives total protection to your code/design
- You can distribute the db to PCs without a copy of Access being on board
- Your data security is far, far better than anything you can do in Access
Don't misunderstand me...there are a few, specialized situations, where an Unbound Form is preferable...but anyone who routinely uses them for everything, has simply made a bad choice in deciding to work in Access.
Linq ;0)>