473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Forms won't save edits to table

I have a form that uses an unbound text box to autofill other text boxes by using the combo box and using the following code in vba: me.name.value = me.ID.column(0)

So you type in a ID and autofills other boxes like name, site, etc.

when I choose an ID and autofills these boxes, I want to be able to edit these boxes if I need to change and update an ID on the fly.

The Forms properties has record source as the only table where this information is on query builder. I am able to update the table by using the query but not update the table by editing on the form. Data Entry = No, Allow Additions = Yes, Allow Deletions = Yes, Allow Edits = Yes. The box that will be edited are not locked and are enabled and is bounded to the source from the table.
Aug 3 '17 #1
10 2766
PhilOfWalton
1,430 Expert 1GB
Need a bot more detail on this.
What is the RecordSource of your form?
What is the RowSource of your Combo Box?

Please send a picture of your Relationship Pane with all the fields in your tables showing.

Read up on reserved words. In your case Name is not good.
Me.Name is actually the name of the current form. If you break the code when running something from a form and type "Print Me.Name" in the immediate window, you will see the name of your form. I have no idea what Me.Name.Value will produce.

Other frequently misused reserved words include "Date", but there is a whole list of them that you can find.

If you really insist on using "Name", you must use Me![Name]

Phil
Aug 5 '17 #2
I have a form that uses an unbound text box to autofill other text boxes by using a combo box and using the following code in vba: me.name.value = me.ID.column(0)

So you type in a ID in the unbound combo box and that autofills other boxes like project, site, etc.

When I choose an ID and autofills other boxes, I want to be able to edit these boxes if I need to update an ID's attributes. These autofilled textboxes are bounded to the table in Control Source to the specific attribute. So the text box project is bounded to the table project attribute.

I want to be able to edit the table through a form so I don't have to go to the table or a query and scroll all the way to the right to make a change.

The Forms properties has Record Source as the table All P where this information is on query builder. I am able to update the table by using the query builder but not able to update the table by editing on the form. Property Form is Data Entry = No, Allow Additions = Yes, Allow Deletions = Yes, Allow Edits = Yes. The box that will be edited are not locked and are enabled and is bounded to the source from the table.

Table name is ALL P and the query builder sql code is below for the unbound combo box Row Source

SELECT [All P].ID, [All P].Project, [All P].[Site ID], [All
P].EngineeringRegion, [All P].[Engineering Market], [All P].Active,
[All P].[On Air], [All P].Notes FROM [All P] ORDER BY [All P].ID
DESC;
The event of that combo box is in After update and the vba code is

Me.Project.Value = Me.ID.Column(1)
Me.Site_ID.Value = Me.ID.Column(2)
Me.EngineeringRegion.Value = Me.ID.Column(3)
Me.Engineering_Market.Value = Me.ID.Column(4)
Me.Active.Value = Me.ID.Column(5)
Me.On_Air.Value = Me.ID.Column(6)
Me.Notes.Value = Me.ID.Column(7)
Aug 7 '17 #3
PhilOfWalton
1,430 Expert 1GB
Let's try to work this out.

The controls on the form are bound to the ALL P Table, so as you go through the records, you will get the values which you can update.

Th Combo Box is based on exactly the same information, so are you saying you want to overwrite an existing record with another record selected from your combo box? Then you will have 2 identical records except for the ID.

Or are you saying you want to create a new record and set the default values from the Combo box?

I am confused to sat the least.

Phil
Aug 7 '17 #4
Thank you for the reply.

I do not want to overwrite an exisiting record or add new ones. I want to edit a records attributes. So if I have ID 12345 in the combo box I want to be able to edit ID's 12345 Delivery Date or other attributes related to it as the combo box autofills the original date. Changing the Delivery Date will be reflected on the table.
Aug 9 '17 #5
PhilOfWalton
1,430 Expert 1GB
Sorry, you're not making sense to me anyway.
Are you saying that you want to use the Combo box to find a record, them edit it.

When you say a Record's "Attributes", do you mean a Record's fields or Data?

Phil
Aug 9 '17 #6
Sorry about that.

Yes the records' fields. I used the combo box to autofill the textboxes with the records' fields. In the form I click in the combo box of ID's and choose 12345 and then text boxes autofill depending on that specific record's field. So choosing 12345 the Delivery date is autofilled by what 12345 has in the table. I want to be able to edit a field like that for example.
Aug 9 '17 #7
PhilOfWalton
1,430 Expert 1GB
Right, I understand what you want, and your description of Autofill is most misleading.

The data is already there. All you want to do is find the record selected by your Combo Box.

What is the RowSource of your Combo Box?
What data do you want to see in the Combo Box?
Which is the Bound Column?
What are the Column Widths?

I repeat, what is the RecordSource of the Form?

Phil
Aug 9 '17 #8
The record source was mentioned in my original and second post of this.

The Forms properties has Record Source as the table All P where this information is on query builder. I am able to update the table by using the query builder but not able to update the table by editing on the form. Property Form is Data Entry = No, Allow Additions = Yes, Allow Deletions = Yes, Allow Edits = Yes. The box that will be edited are not locked and are enabled and is bounded to the source from the table.

I don't need help in finding the record selected by the combo box. My form is nearly perfect, I just want to update a records data fields on a table through a form.
Aug 9 '17 #9
PhilOfWalton
1,430 Expert 1GB
Sorry, I can not help you further.

Phil
Aug 9 '17 #10
The issue I had was resolved. I am able to edit the record through the form.
Aug 17 '17 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: WStoreyII | last post by:
here is the code the picture will not work? <html> <head> <script src="Pimp.Menu.js"></script> </head> <body> <small>
1
by: Tom | last post by:
I need some help please! I've created a query to use the AutoLookUp feature, this almost works fine and well. I have a form to add a new record. On this form the autolookup feature works, as I...
6
by: Ty Salistean | last post by:
I have a form that I inherited from System.Windows.Forms. I use that form everywhere in my system. I went back to my base class form and changed the size, expecting all of my children forms to...
1
by: eduardoben | last post by:
I use a tableadapter with the sql string = select * fom table where field=? I load the desired record in a form and populate textboxes but after i modify them when i use tableadapter.update it...
6
by: subhashkumar | last post by:
Running data Append to a table Dear All, I need a help from this forum, I was developing a small tools for stock market. I get stuck when trying to save the running changes in a data field...
1
by: jdoverton | last post by:
Hey, I need to save a table under a New Table Name while in Access VBA. I need to conserve the properties and Column names from one table to the new table. Any suggestions? Thanks much,...
0
by: CandyClaire | last post by:
hello, I need help here... My index.php page wont submit even after clicking the submit button in a Linux(CentOS) environment.... It would sort of just refresh and then it goes back to the same...
11
by: hannoudw | last post by:
Hi I have a form that contains 2 text boxes and a subform contain the Invoice details. the 1st text box is txtInvoice and its bound to Invoice_number in the invoice table , it's an auto-number. and...
1
by: Alan Mather | last post by:
calculated subform fields will display on form but won't save in table
1
by: dcane1200 | last post by:
I acquired the current database however it has some issues. Some forms aren't editable. Typing and nothing shows. Times when the save record button is clicked, the error "object doesn't support this...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.