I need help troubleshooting an obstacle that has proved quite challenging in my Database. To solve it, I first need people to help me understand the different ways Access 2007 can save fields and records to tables.
Thanks!
I need help troubleshooting an obstacle that has proved quite challenging in my Database. To solve it, I first need people to help me understand the different ways Access 2007 can save fields and records to tables.
Thanks!
You mean enter/edit data through form? Data entry/edit through a bound form is committed to table when:
1. form is closed
2. move to another record
3. run code to save record
Why don't you tell us about the issue?
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.
Same issue as "Need Troubleshooting" thread, just trying to approach it from a different angle.
I don't think I'm articulating myself correctly.
So on a Form I have various Textboxes. What are the different ways I can have the information in that text box saved into a table field?
I have heard that it can be done through an insert query? I am trying to find a work around to setting the Control Source of a textbox on a form to a table field.
An unbound control will show the same entered value for all records on the form. Is this a Single or Continuous view form?
Yes, an UPDATE or INSERT sql action can edit existing record or create new record.
Or if the field is included in the form RecordSource, simple VBA:
Me!fieldname = Me.textboxname
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.
Thank you for your replies. Thread solved.
https://www.accessforums.net/programming/need-troubleshooting-38017.html
You can use a bound form, where the textbox's ControlSource property is a field in the form's recordsource, and that recordsource is either a table or an updateable query.
You can use an unbound form, and code vba statements like
Currentdb.Execute "INSERT INTO TBL_SOMETHING (FIELD1, FIELD2) VALUES ('" & ME.TEXTBOX1.VALUE & "', 'SOMETHING ELSE')
Or you can have a saved Insert or Update action query that refers to the Form control.
Or you can have a saved query and manipulate the CurrentDb.Querydefs("name of query").Sql , which is something I do a lot, if the form is unbound.
Sorry, don't mean to butt in when you said "solved", but I like to think of a thread as always open for more discussion - it's much more enriching to everyone that way.