Does anybody know how to add a value from a text box within an AddNew Method.
My code looks like this:
With component_dev
.AddNew
!Information = Me![textBoxValue]
.Update
End With
It doesn't seem to work though. Anybody got some suggestions. thanks
Good morning! Sorry, but I need a bit more information. Is component_dev a recordset? If so, does it have a field called Information? What error are you getting? Have you tried setting a breakpoint and stepping through the code to find out where the error is occuring?
Sorry to pound you with questions, but with the answers we should be able to get this to work.
Thanks for your help. Yes - component_dev is the recordset and Information is a field in the recordset. The problem is I'm not even sure what I want the code to do is possible. Let me explain. Do you know how when you create a new record in a table with the programmed "Add New Record" button in access, the new row has been created and as you type in the textboxes the fields in the recordset are populated. Well what I want to do is add rows to two tables at the same time, so that is why I have added this code with the "New Record" button. What I think is happening to the code is a new row is created in my second table but when it is looking at the value of the textbox it sees there is nothing in there, so it gives me a null value error message. Sorry if I confused you right now, but I was thinking about the problem yesterday. If you have any input though, I'd really appreciate it.
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.