Search results

  1. K

    Auto-Compute on cells of Datasheet

    Hello, I got something interesting which I hope it really exist. If the title isn't understandable enough, I will explain further. I have a SubForm in Datasheet view. I set SubForm's Control Source with a SQL query in order to display a table of data. Example: Same as the automation...
  2. K

    Run-time error '2448': You can't assign a value to this object.

    Thanks for replying DCrake. I did what you said and got a different error. I tried the following and still got the Run-time error '2448': [1] Set frm = Me.Form![subfrm_L5OrigPlan].Form With frm .OrderBy = cboDateToSort.Value & " " & sSortOrder '<<< ERROR...
  3. K

    Run-time error '2448': You can't assign a value to this object.

    I am using a single-line syntax for the If Statement. If cboSortBy.Value = "Descending" Then _ sSortOrder = "DESC" The underscore ( _ ) is a line continuation. So, that line can be done like this: If cboSortBy.Value = "Descending" Then sSortOrder = "DESC" Both are the same. Another...
  4. K

    Run-time error '2448': You can't assign a value to this object.

    Thanks for your reply ajetrumpet. I would like to clarify what you mean about "the object is in use." At 1st, the Date field is blank. A button is used to select a date and set it to Date field. After setting, the Date data is displayed in the Form (Datasheet view). In the Datasheet view...
  5. K

    Updatable Recordset of ODBC-Connected DAO

    I think you are right. Guess I need some learning on DB Structure. The 1st Table is for product details. Examples are Description, Weight, Height, Color, etc. The 2nd Table is for item transaction details. Examples are Estimated Time of Departure (ETD), ETA, ATD, ATA, etc. The data in 2nd...
  6. K

    Updatable Recordset of ODBC-Connected DAO

    Actually, I am putting all "Description" in one table only. It's like a Master table of an item with Description and ProdCode. In the other table, there's only the ProdCode. So, if there are any modifications of the Description of an item, it should only be done in the Master table of items...
  7. K

    Run-time error '2448': You can't assign a value to this object.

    I actually researched this in this forum and found lots of them but their cases are kinda complicated. So, I decided to post this. Here's my case: Private Sub cmdSortStartDate_Click() Dim frm As Access.Form Dim sSortOrder As String If cboSortBy.Value = "Descending" Then _...
  8. K

    Updatable Recordset of ODBC-Connected DAO

    I kinda understand what Bob did. He was displaying one field from the SubForm "one at a time". Since the data are displayed one at a time, the linked data in the Textbox displays the same (one at a time). What I am displaying in my Datasheet are table of data in X and Y matrix. So, "all data"...
  9. K

    Updatable Recordset of ODBC-Connected DAO

    Thanks Banana. One table in a RecordSource query really works. I guess that is the trick to make it work. Now, my next obstable is displaying retrieved multiple data. I used Datasheet view so that multiple data can be viewed at one glance. If the data to be displayed is just one, the trick...
  10. K

    Updatable Recordset of ODBC-Connected DAO

    Hello Access gurus. I read an article of Banana regarding RecordSource and its Updatability. QUESTIONs: Is it possible for DAO to do the same? Can DAO return a Recordset that is updatable? If so, how? Please take time to check the code I made: Private Sub Form_Load_ForPosting() Dim...
  11. K

    "This Recordset is not updatable" Using ODBC and Multi-Table SQL Query

    Darn...I'm so noob on ODBC. :p Thank you soooooo much, Banana. :) You did enlighten my view on these DAO, ADO and ODBC stuffs. I thought ODBC can "only" be implemented with ADO. My mistake. DAO can "also" use ODBC. Here's what I researched minutes ago. (It may help other noobs as well)...
  12. K

    "This Recordset is not updatable" Using ODBC and Multi-Table SQL Query

    I think I mistakenly explained it in my last post. Sorry. What I mean was I used DAO when the DB was within the Access. I encountered the same problem with DAO but fixed it by setting the Form's RecordSetType into "Dynaset (Inconsistent Updates)". Recently, I was told to separate the DB...
  13. K

    "This Recordset is not updatable" Using ODBC and Multi-Table SQL Query

    Thanks Banana for the links. I guess this is the cause of my problem. :( (dou shou kana) How come things are OK when the DB is locally within the MS Access application but NG if using external DB? If it is because of different drivers, my external DB is the same MS Access and should not...
  14. K

    "This Recordset is not updatable" Using ODBC and Multi-Table SQL Query

    Hello gurus, I am stuck! :eek: [1] I'm accessing the DB via ODBC. [2] The SQL Query consists of multiple tables. [3] Each table in the query has primary key. [4] The query is used for the RecordSource of the SubForm. [5] The RecordSetType of the SubForm is "Dynaset (Inconsistent Updates)"...
  15. K

    Executing Programmatically the Update Query in ODBC

    Actually, my configuration is done in SetADODBConn() Function where the rs properties are filled. Here are the contents: Public Sub SetADODBConn(ByRef cn As ADODB.Connection, ByRef rs As ADODB.Recordset, ByVal sSQLStr As String) 'Create a new ADO Connection object Set cn = New...
  16. K

    Dates going wrong!

    I solved this problem following kinda the same what mailman just posted. My advice is make your own common function and experiment/explore what mailman posted. To test, change the OS Date format to all possibilities in the Regional And Language Option settings of your Control Panel. That's...
  17. K

    Executing Programmatically the Update Query in ODBC

    Thanks for the help, mailman. :) I created a System DSN and giving All Permission to Everyone. So the problem was not the access rights of the user. The problem was that my "rs" was already closed if I use UPDATE, DELETE and INSERT. :confused: So, I should not close it programmatically. I...
  18. K

    Executing Programmatically the Update Query in ODBC

    Hello, It's been a long time since I posted here. I bumped and actually kept bumping on this ODBC stuff. I created a DSN and connected to an external mdb using ODBC. What I did was SELECT the data and it is good. Now, I want to UPDATE some data. After hours of searching, I just can't...
  19. K

    BeginTrans, CommitTrans, Rollback in Datasheet (MS Access)

    Thanks Banana. I made a test form using Leigh Purvi's "Transaction with bound Form" and it worked perfectly. But got 1 flaw when I implemented it to my system. I just can't seem to edit any of the fields. My guess is maybe because the query for my recordset is using more than 1 tables and...
  20. K

    Which event to call a module on?

    Try making this in your module: Option Compare Database Option Explicit Public Function ColourFeatures(ByVal frmForm As Form) Dim MyForm As Form Set MyForm = frmForm End Function That's for setting the passed-by-value frmForm to your MyForm in your procedure inside your module. Try...
Top Bottom