Search results

  1. S

    Restrict update

    I have created a form based on a query which shows multiple records - because the user wants to see an overview of all current records. The user can enter data into blank fields and update the underlying table by clicking on a Save button which also enters today's date into an inactive date...
  2. S

    Access or Crystal Reports

    I would appreciate any advice/opinions as to what advantages, if any, Crystal Reports has over Access. I am used to developing complex queries and reports etc. in MS Access but a job I have applied for uses Crystal Reports of which I have no knowledge/experience. I've got an evaluation copy of...
  3. S

    Running Excel macro produces error

    Hi I'm calling an Excel macro from Access and get an error 440 Method 'Run' of object '_Application' failed I've cut and pasted the offending piece of code into a separate procedure: Sub Test() ActiveWorkbook.SaveAs Filename:= _ "C:\Apps\Reward and Recognition\Quarterly reports\" _...
  4. S

    Refer to subform

    I have a Main form with two subforms Sub1 and Sub2. I want to set the RecordSource of Sub2 from the OnGotfocus event on Control1 on Sub1. My code is: Dim intCtrl as integer Dim strSQL as string intCtrl = Me.Control1 strSQL = "Select * from MyTable where Id = " & strSQL...
  5. S

    Share & synchronise mdb without server?

    My daughter is setting up a small business with a friend - they will work from different locations but will need to share a database which I am going to create. They only have laptops so I need a method to synchronise any changes to the tables. So far I've considered setting up a daily routine...
  6. S

    Bug opening Excel spreadsheet from Access

    I am using the following code, which I have copied from Access VBA Help on GetObject, to open a spreadsheet from Access but when the spreadsheet opens the screen freezes or an Excel.exe error is generated. The declaration section is not included in Help and initially I got an error with the...
  7. S

    Hyperlink causes workbook to open minimized

    I have created a hyperlink on a form to open a spreadsheet but although Excel opens maximized the workbook is minimized. I have tried including some code in the Open_Workbook event : ActiveWindow.WindowState = xlMaximized but it has no effect. Any ideas? Thanks
  8. S

    Sort date formatted as year and week

    I have a table with sales by day. I want to display the data in a graph summarised by week but the period spans several years. If I format the date thus Format(MyField,"yyyy ww") then Access sorts the results thus 2003 1, 2003 10, 2003 11 but it should be 2003 1, 2003 2, 2003 4 etc. How can...
  9. S

    Code to format chart series

    I have three line graphs, DervGraph, UlgGraph and SulgGraph, that display prices by oil company brand e.g. B.P, Asda, Esso, Total etc. One graph shows diesel prices, one shows unleaded prices and the third super unleaded however, not all charts will have the same number of brands displayed e.g...
  10. S

    How can I use * in query

    I want to use the * wildcard in a query if a forms control has been checked to return all records but somehow I haven't got the syntax right. This returns all records with X as the category IIf([FORMS]![Main]![CategoryX]=True,"X") but IIf([FORMS]![Main]![CategoryX]=True,Like "*") does not...
  11. S

    Testing for Null fails

    I have a table where some of the values of MyField are null. I am creating a function that depends on the value of Myfield which I pass to a variable varMyField and am testing it with If IsNull(varMyVariable) but it errors. Have tried setting the variable as a variant but no difference...
  12. S

    Create query to return data by year

    Regret this is not an easy problem to describe... I want to create a graph that shows two lines, Year 1 and Year 2 volumes summed by week from a table that has date and volume fields. I can do this but my solution is awfully messy and involves creating separate queries for Year 1 and Year...
  13. S

    Trigger macro with Pivot Chart Field Button

    Any custom formatting is lost when a pivot chart is refreshed and although it's possibe to write a macro to reformat it, it has to be triggered with a button or key stroke. Unlike Access there don't seem to be any event properties for a pivot chart field button so is there another way to have...
  14. S

    Refresh Excel link to Access

    I have an Excel workbook that is linked to an Access query and I want to be able to refresh the workbook an Access module. If I open the Excel spreadsheet and run a macro that uses ActiveWorkbook.Refreshall the data is refreshed OK without error. In my Access module I have set up a reference...
  15. S

    Line chart - 3 lines from one field

    I have a table with a date field and a price field that contains daily records from 1/1/96 to present. I want to create a line chart that shows the prices for 1999, 2000 and 2001 summarised by month but with a separate line for each year for comparative purposes. Any ideas? Thanks
  16. S

    Validation Rule

    I have a form with several option buttons and a text box formatted as a date. I want the validation rule for the date box to vary depending on which option box has been checked. I have tried: =iif([Option1],True,>=#01/07/2000#,>#01/01/2000#) I haved tried enclosing the Truepart and Falsepart...
  17. S

    How can I reuse functions in other databases?

    How can I use some custom functions I have created in other databases? I have tried saving as .mda file and then installing as an Add In but this is only partially successful because although the functions can be used they do not appear in the Expression Builder so the user has to know they...
  18. S

    Add In Not Displayed in Expression Builder

    I have created three simple functions AveNumber(), MaxNumber() and MinNumber(). They are all contained in a module named My Functions The module is saved as MBC_Functions.mda A. It's possbile to install MBC_Functions as an Add In in the Module tab by Tools, Reference and searching for the mda...
  19. S

    How do I install Add In

    I have created several functions that are contained within a module called My Functions saved in an Add-In database called MBC_Functions.mda I want to make the Add In available to other users - how can I do this? I have tried making entries in the USysRegInfo table of MBC_Functions.mda by...
  20. S

    How can I use File , Update in MSGraph?

    I am using Office 95. I have several graphs embedded in individual forms each with some code linked to the OnOpen event that sets the MinimumValue of the Y axis. The forms are then embedded in a report. I have to do it this way because the code to set the MinimumValue will not work on the...
Back
Top Bottom