Recent content by pradaloh

  1. P

    Chinese input into MSSQL 2005 database through MS Access 2003 user interface

    I have encountered problem while trying to retreive chinese character through MS Access 2003 user interface with data stored in MSSQL 2005. The MSSQL table was import into the Ms Access interface through 'link table' using ODBC. And the column which stored the information was using datatype =...
  2. P

    Automate different document numberring for different depts?

    Hi All, Can anyone advice me on how can I automate document numbering by different depts? Example: Dept A - document no. (1000-1999) Dept B - document no. (2000-2999) Dept C - document no. (3000-3999) Whenever a new document is created for that particular dept, the system should remember the...
  3. P

    Any error with this syntax?

    Hi All, As I am really 'Green' in this line, can anyone tell me what wrong with my syntax? Thanks in advance. INSERT INTO Depreciation (AssetID,DepreciationAmount,DepreciationDate) SELECT Assets.AssetID, CASE WHEN Assets.AssetID FROM Assets not in (SELECT Depreciation.AssetID FROM...
  4. P

    If isnull..... then.... else

    Hi Bob, I have managed to resolve the syntax issue. But My problem still could not be resolved. What I need is, each record can only execute either of the query not both. How can I use a loop to execute: if SELECT Assets.AssetID not in (SELECT AssetID FROM Depreciation) THEN...
  5. P

    If isnull..... then.... else

    Hi Boblarson, I have encountered an error while trying the CurrentDb.Execute sqlUpdate and CurrentDb.Execute sqlUpdate1. Error: Too few parameters. Expected 1. What does it mean? Any other information do I need to declare? Thanks
  6. P

    If isnull..... then.... else

    Hi Gemma, I have managed to come out with 2 queries, but I still do not know how I can perform the loop. Dim db As DAO.Database Dim rs As DAO.Recordset Dim sql As String Dim sqlUpdate As String sqlUpdate = "INSERT INTO Depreciation ( AssetID, DepreciationDate, DepreciationAmount )" &_...
  7. P

    If isnull..... then.... else

    Hi Gemma, As I am very new to VBA, it was already very challenging for me to come up with this quote. It will be great if you can enlightment me further with your suggestion. Thanks in advance.
  8. P

    If isnull..... then.... else

    Hi All, How can I get the below if... then.... else working? What I need is to check if the AssetID does not exist in Depreciation table then it should get the first computation else the second computation. Dim db As DAO.Database Dim rs As DAO.Recordset Dim Depn As DAO.Recordset Set db =...
  9. P

    Update Datasheet records from Subform into table

    Hi All, I have managed to resolve this issue by myself. Thanks!
  10. P

    Update Datasheet records from Subform into table

    Hi All, As I am new to VBA, I really appreciate if any of you can help me with this. Thanks in advance! Components in Mainform: a button (for update) a datefield (for user to input date) Components in Subform: Getting from a query showing in datasheet Query: SELECT DISTINCT Assets.*...
  11. P

    Distinct and DistinctRow

    Thanks Moniker! I will try to narrow the fields which I need in my query. Thanks for your advice.
  12. P

    Distinct and DistinctRow

    I have a problem using distinct or distinctrow in one of my query. The result shown reflects all records instead of distinct records. May I know what may be the cause of the problem? Query: SELECT DISTINCT Assets.*, Depreciation.DepreciationDate, Depreciation.DepreciationAmount FROM Assets LEFT...
  13. P

    How can I loop records from a datasheet and insert into another table?

    I have a main form with only a button, a unbound field (for user to input the date) and a subform show in datasheet. The information from subform is driven by a query with some computation. (Fields consist are: ID,Amt). It consist of mutiple rows of records. What I need is, when user call out...
Top Bottom