Search results

  1. T

    Runtime Error '424' Object Required..

    Your calculation never changes and it's not a function as it doesn't return anything. Public Function HourTotalProgress(ByRef Grad_year As Integer, byref hours_req as integer) As Single If Grad_year = Year(Now()) Then hourtotalprogress = (hours_req / 48) * (Month(Now())) Else...
  2. T

    Multiple connection strings

    bad workman and all that... I did have something a bit more constructive to add but I've lost the enthusiasm to type, the grumpy teenager act doesn't help really. The only thing I can still be bothered to add is whether you really want linked tables that might be pointing to different data...
  3. T

    Join Properties

    If you put criteria for table2 then yes. There are no matching records in Table2 so you get 0 rows. You could use an OR statement in your query: WHERE table2.criteria = something OR table2.criteria IS NULL Then you'll still get your three records (table2.criteria IS NULL) where there are no...
  4. T

    Recordset.Update produces application crash

    vRS.AddNew vRS.Fields("tAdressID") = Me.tAdressID vHistoryID = vRS.Fields("tHistoryID") vRS.Update Looks like that's got switched round.
  5. T

    Splitting positive and negative figures into seperate columns

    Change the blank space in the IF statements to a 0 Credits: IIf(Table1.Transactions > 0, Table1.Transaction,"") to Credits: IIf(Table1.Transactions > 0, Table1.Transaction,0)
  6. T

    Splitting positive and negative figures into seperate columns

    Select accountnumber, Sum(credits) As totalCredits, Sum(debits) as totaldebits, Sum(credits) - Sum(debits) as Balance FROM PreviousQuery GROUP BY accountnumber Groups by the Accountnumber, sums all of the credits and debits into totals and outputs the difference between the two as a "balance"...
  7. T

    sql question on using "as"

    It'd be a lot easier if your table was properly normalised SELECT f.Formula FROM table1 as f INNER JOIN ( Select Formula FROM table1 WHERE Ingredient = "water" ) as w on f.formula = w.formula Where f.ingredient = "flour"
  8. T

    Access & SQL Server

    The short answer is No, I wouldn't use a distributed Client at all for an app like this even if those 3-4 sites were all the same company, I'd want the business logic on my servers where I control what's going on especially on a system holding and manipulating patient data (that's my...
  9. T

    Fetch data from Access to Excel

    I think most people here are happy to give pointers or help trying to fix problems but "write my code for me" isn't something that many will do for free. That being said, quick overview of retrieving data using DAO (set a reference to Microsoft Data Access objects n.nn in the Excel VBA Editor)...
  10. T

    Access & SQL Server

    This is one of those unhelpful answers in that it largely Depends (on what you want to do). Access is (or can be at least) a very good front end to SQL Server. It's relatively easy to set up, especially if you're already used to Access. Is very flexible in terms of how you manipulate data and...
  11. T

    Concatenate fields in multiple records into one record

    Crosstab Query. Doesn't concatenate them per se but pivots the data to give an output in that format.
  12. T

    Is this normalised to 3NF?

    ^^ what he said basically. Knowing nothing else about what's going on, the 4 treatment columns should be ringing alarm bells. What happens if next week they want 6? If you only book one treatment what goes in the other three? Even if you have a cast iron, 100% written guarantee, signed in the...
  13. T

    VBA coding help

    Just to go through in order. You need the append query initially to populate the tables, once they're populated run qryFinalOutput. The initial population is a one-off exercise now you just need to cater for adding new coordinates and photos. That structure significantly reduces the...
  14. T

    VBA coding help

    The source data table is empty because, well I don't have the source table, it's an example. as for inserting the photos, the design view: Illustrates it. The photodirection column is currently set to text so as the North_photo column from the source is imported to the PhotoPath, "North" is...
  15. T

    Example of SQL Server Stored Procedure which does SELECT, ADO Command / Parameters?

    Pbaldy's solution works just as well, as with everything, there's more than one way to skin a cat. I tend to use a similar method to yourself regardless of what the SP is doing.
  16. T

    Example of SQL Server Stored Procedure which does SELECT, ADO Command / Parameters?

    You've lost me a little on this, there's no functional difference between a stored procedure that runs an INSERT statement and one that runs a SELECT statement. http://support.microsoft.com/kb/174223 Example using command.parameters.refresh on a select query using an input parameter, output...
  17. T

    VBA coding help

    I replaced four columns for the photos (north south etc) with 1 column for the path and a Direction column to indicate which one it is. Hopefully trying to attach the sample file for you to have a look at
  18. T

    VBA coding help

    as per the original example: SELECT tblPhotos.CoordID, [PhotoYear] & " " & [PhotoDirection] AS [Year&Direction], tblPhotos.PhotoPath FROM tblPhotos; you don't need to specify the direction, that's coming from the photoDirection Column. the field name comes after the actual field(s) itself...
  19. T

    Example of SQL Server Stored Procedure which does SELECT, ADO Command / Parameters?

    There is (was?) a system stored procedure designed to receive and execute SQL as a parameter it's name eludes me off the top of my head, but if you're going to pass an entire SELECT statement to it, why try and then also pass parameters and then set them? The SQL is in the application so you...
  20. T

    Percentage calculation

    Is now a bad time to mention that it's not really good practice to store a calculated value like that? If gonelive or target are updated before that query runs again then conversion isn't reflecting the values of those fields. It would be much better to put that calculation in your output...
Back
Top Bottom