Search results

  1. G

    How to get a record into a string

    No, you will need to use SQL to do that.
  2. G

    School Report System - please help

    Hi Andy - I think that I am still trying to sort out what this is supposed to do. It looks to me like you are trying to take all the individual records (Student, Subject, Teacher, Comment) and aggregate them by student (Student, Subject1, Teacher1, Comment1, Subject2, Teacher2, Comment2). Am...
  3. G

    How to get a record into a string

    Hi - (and welcome!) The most simple way is to use the DLOOKUP function. E.g. tbString = DLOOKUP ("[Field]", "tblData", "[Field] = <some match criteria>") Note: if you are matching a string criteria then you have to put extra quotes around the criteria so that Access recognizes it as a...
  4. G

    Subforms - adding new records, etc...

    Hi Mike - If you link the form and subform as parent/child then you should be able to enter detail records and have then get the correct header field (as long as this is the field used to link them). You can total a field on the sub-form and put it in the subform footer. [You may also be able...
  5. G

    Sub Form With All Unbound Text Boxes To Store Record

    Hi Ashfaque - You write the subform records essentially the same way that you wrote the main form. The fields on the subform are accessible to the main. The syntax can be a little confusing but here is the basic format: Forms![main form name]![subform control name].Form![control name] (See...
  6. G

    How to group records

    You're welcome! :-)
  7. G

    Derived Fields (SQL)

    Good job, Mandy!
  8. G

    How to group records

    Sorry, should have mentioned... Grouping by Event Id AND Event Title, should preserve the separate events . Even if they have the same title, the ID should separate the totals.
  9. G

    How to group records

    SQL queries that use aggregate functions (SUM, COUNT, GROUP BY etc.) are a little fussy. All the fields that are returned need to be in one of the aggregate functions. In this case, Event_Title is not included in any function, so it generates the error message. Try this instead - SELECT...
  10. G

    Sub Form With All Unbound Text Boxes To Store Record

    Hi - You should also be able to use the same approach to unbind the subform. I am not sure what your specific question is. What part of this do you have questions about? - gromit
  11. G

    bounding a subform to a combo box

    hi - Should be achievable. I would use the AfterUpdate event of the combo box to modify the recordsource of the subform. You modify the SQL statement for the recordsource depending on the selections. Note: I seem to recall that this doesn't work if you have a parent/child relationship...
  12. G

    Add a letter to the beginning of field

    Hi - Use an expression for the new field. E.g. NewField: "V" & tblData![OldField] hth, - g
  13. G

    Derived Fields (SQL)

    Hi - and welcome! You need to create a query that joins the Employee table and Department table (should be straightforward if you have the Department information stored as a foreign key for your Employee table). You can then use the aggregate functions to get the MAX of the salary and the...
  14. G

    Null Values in query

    You need to adjust the table joins in the query. With the query in design view, you should be able to look at the tables with the lines between them. These lines indicate the relationships. Click on the line and select "Join Properties". This will give you the option to include all the...
  15. G

    How to group records

    Hi - Try something along these lines... SELECT tblEvent.Event_Title, tblEvent.Event_Price, Count(tblDelegate.Delegate_Name) AS NumberBooked, Sum(tblEvent.Event_Price) AS TotalPrice FROM tblEvent INNER JOIN (tblDelegate INNER JOIN tblBookings ON tblDelegate.ID = tblBookings.Delegate_Id) ON...
  16. G

    defaulting to prior year data....Dlookup?

    Hi - For DLookup to work with a date, you need to enclose the data with # signs. E.g. DLookUp("[Data]","data_table","[Date] = #12/1/2005#") If you use a calculated date expression, it looks like this... DLookUp("[Data]","data_table","[Date] = #" & [Expr1] & "#") Also, you may have some...
  17. G

    Insert into statement with tables from 2 databases

    Hi - First try building your SQL statement as an insert query from one table to another in the same database. Build and test in a query design window before developing the code. My first guess is that you are missing some spaces in the SQL statement (such as after commas). - g
  18. G

    Search in 3 columns

    Hi - welcome Sure, you can search each of the columns. When you are in the "Design View" of the query, you can enter a value for each column to search on. Important Note: If you enter a value on the same line in design view, then the search conditions must ALL be met. E.g. if you put...
  19. G

    Difficult to explain yet simple problem...!

    You can use wildcard characters in SQL queries which might offer some additional flexibility. Again, I think that the best you can hope to achieve is a reasonable guess with a confirmation by the user.
  20. G

    Updating query with IN STATEMENT failing.

    Steve - It looks like your use of [Enter Message ID's] is problematic with multiple numbers. I don't use this technique often myself, but it works okay with a single ID, but doesn't seem to interpret multiple ones correctly. I put [Enter ID #1], [Enter ID #2] as the IN statement and it...
Back
Top Bottom