• Runtime Error 2448 (Office2K)

    Author
    Topic
    #412034

    I have a form which is bound to a table by placing the table name “Sites” into the form’s “Record Source” property. Many of the text controls on the form are directly bound to associated columns of the table, but I have one set of text controls that I have left unbound, since I do extensive rangechecking on the values before allowing them into the table row.
    In the past, on a prior project, I was able to initiate the rangecheck and table write operation by clicking on a command button which examined each of the unbound text fields individually, and ultimately assigned a value to the table row by the following type of assignment:

    if intStart > 0 then
    me.SunStart = intStart
    else
    me.SunStart = Null
    endif

    where “SunStart” is a column name in the “Sites” table, and “intStart” is the rangechecked value from the local form. This code segment seems to work in the previous project.

    In the new project, I get the runtime error 2448 (You can’t assign a value to this object). I have checked the References and they are identical in both projects, as are the column definition properties. The only difference I can think of is that the prior project’s table had a single row in it. The current project has multiple rows (the failure occurs on the 1st row).

    I have been unable to locate any further information on the 2448 code, either from the local Help file, or from the MSDN online. I’m sure there is some obvious reason for my problem, but I can’t seem to figure it out, or get any help from MS. Any further insights would be greatly appreciated.

    — Jim

    Viewing 1 reply thread
    Author
    Replies
    • #897711

      Is SunStart the name of a field in the underlying recordset that is not represented by a control on the form? If so, you may need to add a hidden control bound to that field rather than trying to directly write to the underlying table, which is not the best programming approach even if you can make it work.

    • #897712

      Is SunStart the name of a field in the underlying recordset that is not represented by a control on the form? If so, you may need to add a hidden control bound to that field rather than trying to directly write to the underlying table, which is not the best programming approach even if you can make it work.

    Viewing 1 reply thread
    Reply To: Runtime Error 2448 (Office2K)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: