Search results

  1. R

    not going through the table

    No problemo, glad to have been of some help.... Best of luck with your next post!
  2. R

    VBA and SQL

    Hi It looks to me like you just need to declare strMysql, ie: Dim strMysql as String Then the code should work Hope this helps
  3. R

    not going through the table

    Hi There is no looping here, from what you've said you are setting 2 values in combo boxes & returning values from a table into text boxes...
  4. R

    Exporting to text file

    Create an Export Specification & set the "Field Delimiter" to {space}. To format numbers, the best thing to do is format them in the table or query you want to export. Hope this helps
  5. R

    not going through the table

    Try using Domain functions to get the highest price; for example: Me.EnhPriceSellTxt = _ DMax("enhpricesell","enhancement","enhname = enhnamelist") Hope this helps
  6. R

    complete beginner in writing codes

    Try this:- Public Function Ratio(Value As Double) As Double Ratio = Value / DAvg("value", "table") End Function put this code in a standard rather than a class module This assumes your table name is "table" & the name of the field you wish to 'ratio' is "value". You can use this function in...
  7. R

    Need help on Building an SQL statement

    Sql Hi A good walkthrough SQL can be found at http://www.w3schools.com/sql/ It covers most everything you need to know.
  8. R

    Exporting as Text

    Thanks for the response Mile-o-Phile. It's a shame though that any tables to be exported need to be run through a query...it seems a little unnecessary....unless anyone has any further recommendations????
  9. R

    Exporting as Text

    Hi all Can anyone help with a question on exporting from Access as text? My difficulty is that whenever I export a Date/Time field, it has the date & time no matter which format I give it (general date, short date, etc); so I get, for example, 01/01/2004 00:00 when I haven't specified a time...
  10. R

    Drop Down Field in Form

    Hi Can you be a little more specific about what you want to do. It's easy to get a field to inherit the value selected from a list or combo box, but it gets harder if you want multiple selections
  11. R

    Listbox to display certain records only.

    Hi You have been offered 2 useful methods, & as I use a slightly different one, here it is: Use the "on change" event of your combo box & enter the query SQL as the rowsource of the list box (eg. list1.rowsource = "SELECT.........."). In the SQL statement, use the WHERE clause to refer to the...
  12. R

    query challenge

    Try this one: SELECT ItemType.ItemTypeID, FreightType.FreightTypeID, ItemType.Type, FreightType.NumberOf FROM ItemType RIGHT JOIN FreightType ON ItemType.ItemTypeID = FreightType.ItemTypeID WHERE (((FreightType.FreightTypeID)=1)) OR (((FreightType.FreightTypeID)=2)) OR...
  13. R

    query challenge

    I think I have what you're after now... SELECT FreightType.FreightID, ItemType.ItemTypeID, ItemType.Type, FreightType.NumberOf FROM ItemType LEFT JOIN FreightType ON ItemType.ItemTypeID = FreightType.ItemTypeID WHERE (((FreightType.FreightID)=1)) OR (((FreightType.FreightID) Is Null)); Have a...
  14. R

    query challenge

    Hi I believe that if you leave out the "where.." clause you should get what you want Regards Robert
  15. R

    Calculater query

    Hi again What I showed in the first reply was just the underlying SQL to generate the fields you require. You can add the "number of days overdue" (which I forgot) by adding No of days Overdue: Date()-[Date_Duein] as an expression in the Field line of the Desgn grid. This translates to...
  16. R

    Transposing Data

    Thanks for the reply Pat. As you could probably guess, I was trying to deny myself the inevitable task of creating 106 queries! Fortunately, although there is further input to be made to the main table, this is a temporary database & I should be able to 'get away with it'...phew. However, I'll...
  17. R

    Calculater query

    Hi You can create a simple select query along the lines of this: SELECT [Tablename].Book, [Tablename].[Date out], [Tablename].[Date Out]+30 AS [Date Due In], IIf(Date()>[date due in],(Date()-[date due in])*0.23,Null) AS [Overdue Charge] FROM Test_Dateout; I have selected the book from the...
  18. R

    Crosstab Query

    Hi again Manu It's pretty straightforward really. I create a number of crosstabs valued by sum, min, count, etc; for example, Customer|Order No|Sales qty(sum) Customer|Order No|Sales qty(avg), etc These are based on a table containing lots of orders & are pivotted in the crosstab on Date...
  19. R

    Crosstab Query

    Hi Manu I think I've tried this once or twice & always ge a message telling me I cannot have more than one value. To get round it I create a number of crosstabs & then 'rack em up' using a select query. Hope this helps Rob
  20. R

    Transposing Data

    Thanks again Mile-O I do appreciate the advice & am now considering a different approach to using Access - that is, spend more time designing & less time data dumping & then writing cumbersome queries to get at the data I really need! I'll take some time to look at normalisation to remove all...
Back
Top Bottom