Edit record in form

Jerome

Registered User.
Local time
Today, 04:30
Joined
Jul 21, 2009
Messages
77
Hello,

I have a table filled with data (8 columns) and 500 records.

I have made a search form ( with a lot of help from the forum users) that lists records that meets certain search criteria.

When a row of the list box is clicked double ( I assume this is the double click event, but how do you know which record number this is ?), I want some the row to be opened in a form in separate textboxes.

So my question is, for example when I click the first row in the list box:


1. put the data that's in column 1 in text box 1 and the data that's in column 6 in text box 2?

Can this be done by " textbox1.text = tablename.recordnr.column(1).value" or is there a more efficient workaround?

2. And after this record has been edit, how can I put this data back into the table? maybe something like this: "tablename.recordnr.column(1).value = textbox1.text"


I have some Excel VBA programming skills but have problems finding the right functions.

Thanks in advance.
 
Last edited:
If you used the wizard to create the list/combo box you are using to search, there is an option to "Find a record based on the box selection".
If you selected this option, the record you select in in list/combo box should be placed into the form. If you only want selected fields placed on the form, simply place only those fields in the form.
Any changes you make on the form should be made to the record as you make them.

You can go the other way
textbox1.text = tablename.recordnr.column(1).value
but i believe that will require you to add a specific save function when you close the form.
 
If you used the wizard to create the list/combo box you are using to search, there is an option to "Find a record based on the box selection".
If you selected this option, the record you select in in list/combo box should be placed into the form. If you only want selected fields placed on the form, simply place only those fields in the form.
Any changes you make on the form should be made to the record as you make them.

I can't find this option: "Find a record based on the box selection" in the wizard?

Just being curious:

What's the right syntax for this:
textbox1.text = tablename.recordnr.column(1).value

Cheers :)
 
With the form in design view, use the wizard to create a combo or list box.

It should be the third option.
 

Users who are viewing this thread

Back
Top Bottom