Search results

  1. J

    OpenRecordset and ODBC linked tables

    Here is an example on what Galaxiom is trying tell you psudocode: Dim blnConnected As Boolean Dim dbConnection As DAO.Recordset Sub MainLink() 'Loop ODBCTables ...your loopcode goes here ' end loop blnConnected = False dbConnection = Nothing End Sub Function IsODBCConnected(TableName...
  2. J

    Continuous form - current vs selected record on cmd click

    No a commandbutton when it's clicked moves the focus to that record and makes it the current record so you can refrence the correct record in your code. By making it transparent your users will think they are clicking an image, but the button has to be on top of the image and NOT underneath for...
  3. J

    Continuous form - current vs selected record on cmd click

    Why don't you create 3 commandbuttons and place these over your images, and use the commandbuttons Click_Event to execute your code. Just set the commandbuttons backstyle property to Transparent to "hide" them. Just a thought. JanR
  4. J

    Mutliplication with str function

    FYI the order of mathematical operations is different for a computer than a human. For a human this: 2+2*4 = 16 A computer will look at the same expression and conclude that the answer is 10. 2*4+2 = 10 Be explicit in the order you do the math. (2+2)*4=16 Regards JanR
  5. J

    Formula paste error

    This should get you started. Function Phases(CurPhase As Variant, NumOfDays As Integer) As String Select Case CurPhase Case "Phase 1", "Phase 3a", "Phase 5", "Phase 6" If NumOfDays > 5 Then Phases = "RED" ElseIf NumOfDays > 3 Then...
  6. J

    Update Table 1 Certain Fields based on Table 2

    Look into Update query with an Inner Join on you ID field on both tables. something like this perhaps: Update Table1 Inner Join Table2 On table1.ID=Table2.ID Set table1.Price=table2.price, Table1.[Date_]=Table2[Date_]; Btw a fieldname like Date_ not a good idea, just saying. JanR
  7. J

    InitialiseEvents problem Plz Help

    Try and call the Function in the Open event of your subform also, it should work. The subform will load before your mainform and be dumped in your subformcontrol on your main form. JanR
  8. J

    Problem with Decimal separator

    You can wrap your DMin Expression using the Str() function. DLookup("Id_Rozklad", "tblRozklad", "sna = " & Str(DMin("sna", "tblRozklad"))) works ok in my test JR
  9. J

    msgbox with combobox value in not in list event.

    You can't change a constant during runtime, so dim message1 as String. Private Sub cboCategory_NotInList(NewData As String, Response As Integer) Dim Message1 As String Message1 = "The data you have entered " & me.cbocategory.text & " is not in the current dataset." Const Message2 = "Add now?"...
  10. J

    Search results into Excel

    you did not copy exactly what was in the code. ... For Each fld In rst.Fields ApXL.ActiveCell = fld.Name ApXL.ActiveCell.Offset(0, 1).Select Next rst.MoveFirst xlWSh.Range("A2").CopyFromRecordset rst ... the line rst.MoveFirst should be on the next line JR
  11. J

    Search results into Excel

    You can use this code from the same site to export a forms recordset instead of a saved query. http://btabdevelopment.com/export-a-forms-recordset-to-excel/ Godd luck JR
  12. J

    Urgent Help Required about Case in ACCESS 2010

    You forgot quotes around the choises. try: Switch([Receiving].[Pdate]>[Allpos].[Delivery],"Late",[Receiving].[Pdate]=[Allpos].[Delivery],"Same",[Receiving].[Pdate]<[Allpos].[Delivery],"Before") JR
  13. J

    Urgent Help Required about Case in ACCESS 2010

    Use the Switch() functionhttp://www.techonthenet.com/access/functions/advanced/switch.php JR
  14. J

    modifying data using another table

    To update a table field with values from an other table you use an updatequery with an inner join on the field that links the two tables together. ex: UPDATE Table1 INNER JOIN Table2 ON Table1.SomeUniqueField = Table2.SomeUniqueField SET Table1.Field1 = Table1.Field1 + Table2.Field2 That way...
  15. J

    Parameters to Query String

    @BluIshDan You are welcome, I'll take "I'm the man" :D Jan Roger
  16. J

    Update Query

    You want to add new persons as well as updating old records? Considery an update query where you do an outer join (left or right) on firstname and lastname and DOB. (see attached image for a visual example) Query SQL: UPDATE NewData LEFT JOIN LiveData ON (NewData.FirstName =...
  17. J

    VBA INSERT query

    Since your regional settings uses comma as a decimal seperator for numbers and Jet/Ace-engine expect a period as seperator it will fail. solution 1 is to wrap 'nieuweprijs' with the Str() function to covert the number into something the engine can understand ... & Str(Nieuweprijs) & ...
  18. J

    Insert and Update at the same time

    I'v added some more information in my last post, hope it makes sence Jan R
  19. J

    Insert and Update at the same time

    Switch the join to tblSource.SourceID = tblDestiantion.DestID UPDATE tblSource LEFT JOIN tblDestination ON tblSource.SourceID = tblDestination.DestID SET tblDestination.SomeText = [tblSource].[SomeSourceText], tblDestination.MyDestID = [tblSource].[mYSourceID]; and you get this table: DestID...
  20. J

    Insert and Update at the same time

    No problem Spike, I'll pop out to see if the rain has started:) Jan R
Back
Top Bottom