Search results

  1. M

    Export querydef from Access to VBA to Word

    Hi Everyone! I have a rather complicated query which in essence takes a pass through query, writes the query to a VBA matrix, manipulates the data and then exports it to word as an invoice. Now here's my problem. Currently I have created a word document with built in bookmarks that allow the...
  2. M

    Export to Word from Access

    Hello Everyone, I'm trying to create an export to word but am having some trouble. I keep getting the following error; Run time error '91'; variable or object of With block not defined. This error occurs at Set TblWord = docNew.Tables.Add(Selection.Range, 3, 5) I have a feeling its...
  3. M

    Searching date before and using this in WHERE condition

    Hi everyone, I have a table that has 4 fields; id_vl, id_product, date_vl, vl. Basically each product is valued either on a monthly, weekly or daily basis. I want to create a filter that is based on a text box that filters the dates from which one can look at the dates of valuation and the...
  4. M

    Pass through query results to matrix which is then exported to excel

    Hi all, I have wrote some code which calls a query using querydefs and then pulls all the records into a table. This table is then exported to excel, however I seem to be having some trouble with the export and am finding it difficult to identify where the problem is coming from. When I run my...
  5. M

    Query will only return maximum of one result

    Hello everyone, Does anyone know why this SQL will return only one query maximum? DateLimiter: (SELECT Date_Retro_Fees_Rate FROM tblRetroFees AS Alias WHERE Date_Retro_Fees_Rate = (SELECT FIRST(Date_Retro_Fees_Rate) FROM tblRetroFees AS Alias2 WHERE Alias2.Date_Retro_Fees_Rate >...
  6. M

    Trouble with filtering records

    Hello everyone, I have a bit of a problem running a query that may either need some SQL code or may be completed in Design mode. I have 6 fields: Deal_id, Product, Date_VL, VL, Date_Retro_Fees, Retro_Fees. Basically each deal has an associated product. The price of this product changes either...
  7. M

    Passing parameters in a QueryDef by using prgram code

    Hi everyone, A bit stuck on how to execute some code. I have a query that searches for records that are between two dates using the WHERE clause. The two dates are referenced to two respective text boxes on a form. On the same form I have a button that will launch the query in VBA using...
  8. M

    Query not responding

    Hi everyone, I have some SQL code that is giving me some bother. I am creating a qeury whereby I have four fields in a table (id_vl,id_product,date_vl,vl). Basically each weekday I add a new value to VL (the value of a stock lets say) for each stock product that we are interested in. I want to...
  9. M

    Select case function

    Can anyone help me understand why when I run the code, VBA always skips to the last Case Else scenario, regardless of if there is a hash at the beginning, the end or both of the control Me.Liste_documentation.column(3). Dim PathName As String, RemoveHashL As String, RemoveHashR As String...
  10. M

    Missing functions from VBA

    Hi all, I have been developing some new features for an access data base that my company uses. I have been creating these new functions with VBA in a database that I have made by myself. Having created them and now wanting to transfer the VBA code over to the new Access file, it appears that...
  11. M

    Shell function and Run time error 5

    Hi there, I'm looking to use the shell function to dynamically call different pdfs that are in a directory. However I'm getting run time error 5 "Invalid procedure or call argument". Here is the code (very basic I know).. Private Sub Liste_Documentation_DblClick(Cancel As Integer) Dim...
  12. M

    Automatic population of field in adding a new record

    Hello everyone, I would like some help in determining how to automatically populate a certain field. To add some context, I have a form which registers the details of a contact with standard information of contact details. There is a subform which shows the different products that the client...
  13. M

    Opening a report: Error 3211: Database Engine could not lock table

    Hello all, I have a small problem that I would like to have some help with. I have a form that contains a subform. The subform is a datasheet which calls the results of a query of 4 tables (tbl_companies, tbl_deals, tbl_products, tbl_vl). In the main form there is a button which opens a report...
  14. M

    Preventing data entry duplicates

    Hi Guys, New programmer here so please be kind on my terrible errors! I'm trying to prevent duplicate data being entered into a given database and need some help. I've wrote the following code in the after update event of the "date_vl" control, which is after the input of the product control...
  15. M

    Comparing two from rows in the same field

    I have a table [VL] with four fields, [vl_id], [product], [vl_date], [valeur_liquidative]. The idea of the table is that you can input and update the value of each product on a given day. I need to find the difference in days between successive dates (vl_date) each time that a product value...
  16. M

    Multiplying fields from different tables

    Firstly apologies as I'm a novice at Access and am still familiarising myself so I appreciate any help you can provide. I'm trying to create a query that will return a calculated field called "PnL". The formula for "PnL" is as follows: PnL = notional*management_fee*NAV* The "notional" field...
  17. M

    'Enter parameter value' bug

    Hi everyone, I'm new to access and was wondering if anyone could help with the standard 'enter parameter value' prompt that catches all newbies out. Basically, I have a form that has two combo boxes (combo1 & combo2) in a form "Client_database". The record sources for each of these combo...
Top Bottom