I am sure this is a very basic lack of thought/knowledge on my part. It's a long time since I did any code.
So here goes. I'm recording data about my Aol ancestors I have a single user database in Access with one main table Aol toll free and 4 other tables, one of which is called "Concerns" and is a 2 column table with autoID numbers and short names e.g. 10,WilliamT-2. Concerning: ID Autonumber, Firm (short text) The main table has a form which has various boxes including a combo box which refers to "Concerns". I have now started recording ledger entries from 1837-1850 and the Concerns field will be the same in all of them ( No 10,Wm2). So, if there is a page reference in the box "Ledger page", I would like, inter alia, to set the Concerns box to 10 programmatically without having to do it myself for the next several hundred records.
Herewith Aol toll free my simple code, which will set a value in an ordinary text box, but will not set it for "Concerns", giving error 3032
Private Sub Ledger_page_Exit(Cancel As Integer) Concerns.SetFocus If Ledger_page.Value <> 0 Then Let Concerns.Value = 10 Else Let Concerns.value=Null
End Sub
I am trying to set the value of Concerns to numeric 10- corresponding to Wm2, firstly in the form and thence into the table itembasic. I am not trying to add a record. That way when I go back to the record in the form, it will show up as WilliamT-2. However, I can't make it work, probably because the datasouce is from the table "Concerning" and not set to receive anything else.
I can't find the Aol toll free solution after several hours- so I have to ask! No doubt I have omitted something vital.
Screenshots of the fields of Itembasic (main table) and both form and design modes for the Item1 form will be appended as soon as I am verifiedhanks
Mike