Search results

  1. F

    Result of Count Query in a Text Box

    Hi, I have a query the counts rows from another query. I would like to put the result of the count in a text box in a form. The form itself has a different record source to the count query doesn't show in the 'Add Existing Fields' window. I tried clicking in the text box, then Control Source...
  2. F

    Combobox with "Any" as 1st/null value?

    Hi I have a combobox with a list of values fed from a table. Simply ID and Name, ID hidden and Name visible. I need to add the word "Any" as the first option, before the list of values from the table. Access usually has the 1st row as an empty/null field with no value. I could either add the...
  3. F

    Is my database getting too large?

    Hi all, I have a 3 year old Access 97 database that contains 16 tables, the largest of which (purchase order details) contains 13000 records. The file comes to 36MB. given that the file is 36MB after 3 years, and one table is already 13000 records long, is there anything I need to do to...
  4. F

    Update Query's SQL in VB

    I have a form with a button. When I click on the button I want to update the Sql in that query to something else - in a similar way to updating a form's recordsource I guess? Thanks
  5. F

    Format DLookup to Currency

    I have the following: =DLookUp("Nz([GetTotals],0)","TotalExp_SO_Show") Anyone know how I can format it to a currency? I've tried putting £#,##0.00;(£#,##0.00) in the format box on the property sheet. This usually works but doesn't seem to with DLookup. Cheers
  6. F

    Reference a query from a textbox

    Hi, I use the following syntax to reference a form from a textbox: =[Formname].[Form]![Item] Is there a way I can do the same for a query. I've tried the following but it didn't work. =[Queryname].[Query]![Item] Thanks
  7. F

    Restrict to Filling in Forms - but allow formatting

    I have a protected form so the user can only fill in form fields. However I want them to be able to change text size, colour, bold, italic etc. I've tried "Limit formatting to a selection of styles" ticked and unticked. But either way ALL formatting options are greyed out. I've even tried...
  8. F

    Display sum from query on Form

    I have the following query that pull in all stock order details: SELECT StockOrder.OrderDate, StockOrder.OrderDiscount, StockOrder.Carriage, StockOrderDetails.Quantity, StockOrderDetails.UnitPrice, StockOrderDetails.StockOrderDetailsID FROM StockOrder INNER JOIN StockOrderDetails ON...
  9. F

    ComboBox - Choose from list but not delete

    Hi all, I have a form with a combobox with a list coming from a query. I want users to be able to select from a list but not be able to press the delete or backspace keys. Does anyone know how to do this? Thanks
  10. F

    Set visible of variable report

    Hi, I have the code: Report_PartsListRpt.Visible = False But I need to use a variable in place of PartsListRpt. I've tried replacing PartsListRpt with the string variable (lets call it MyVar), but it's looking for a report called MyVar. Does anyone know how to do this? Thanks
  11. F

    Find and Replace all null values in a column

    Hi, I have a table with several columns and rows. Some of the rows have a null value in one of the columns, so I would like to do a find and replace on that column. I've tried the find and replace facility in Access, but it wont let you search for a null value. I take it this means I need to...
  12. F

    Message Box Loses Focus

    If have the following code in a public module Sub RunValidate() If IsNull(Form_Form2.Description) = True Or Form_Form2.Description = "" Then Form_Form2.Description.SetFocus MsgBox ("Please enter a description for your item(s)") End If End Sub Basically if the user moves out of form2 (presented...
  13. F

    Check all subform rows before closing form

    I have a form with a filtered query as the datasource. This pulls in 3 rows in the subform (datasheet) based on the filter. The user can then add more rows in the subform. I want some sort of validation to make sure one of the columns isn't empty so if the user tries to exit the form they get...
  14. F

    vbYesNoCancel Open Report on Yes

    I have the following code: Answer = MsgBox("My prompt?", vbYesNoCancel, "Title") If Answer = vbYes Then DoCmd.OpenReport MyReport, acPreview, "MyReportFilter" ElseIf Answer DoCmd.OpenReport MyReport2, acPreview, "MyReportFilter2" End If However, when I click on Yes or No, no report...
  15. F

    DoCmd.OutputTo Create folder if it doesn't already exist

    Hi, I have a button that exports a report to RFT (then opens it) as follows: So if the button were to be clicked today (29/12/2008) the report would be saved to: C:\Reports\2008\Report.rtf However, if the folder "2008" isn't already created, the file wont save. I want it to automatically...
  16. F

    Return only last record of child table

    I have 2 relational tables. Parent: Quotations Child: QuotationRevisions Currently my query returns all entries, so for example the 1st row of the "Quotations" table contains 8 rows in "QuotationRevisions" (where Q_QuotationID = 1) . Instead of all 8 rows being returned, I would like it to...
  17. F

    row and column borders

    Hi all, I have a report returning rows of 'Quantity', 'Description' and 'Price'. I would like each row returned to have grid-like borders i.e. lines between rows and columns. Normally I only have a line for the rows so just draw a line or rectangle. To get borders around each field I have...
  18. F

    Disable Microsoft Jet Engine Message Box

    Hi, I have a form that contains 3 required fields i.e. linked to other tables using an ID. If the user tries to close the form without entering data in the required fields I get the message: "The Microsoft Jet database engine cannot find a record in the table 'table name' with key matching...
  19. F

    format textbox to display Currency and Percentage

    Hi, I have a query with 3 fields - PaymentAmount and PaymentTotal. The third field is a percentage of the two e.g: PaymentAmount = 10000 PaymentTotal = 12000 PaymentPercentage = 83.333333333333 In my form I would like a text box to display the two combined i.e. £10.000.00 (83.33%). At the...
  20. F

    Sum of Subform Field

    Hi, Just to give you a bit of background to my database... A job (project) can be created and purchase orders can be attached to it. The customer may pay for the job when the work has been carried out or pay in installments. So each job can have a number of payments against it. Here is...
Top Bottom