Search results

  1. B

    Access date information to SQL Server

    Hi, I have an Access form that saves some simple data to a SQL Server table. Everything except the date field data is saved. I get the following: 1900-01-01 00:00:00.000 in the SQL date field. Here is my code; Dim dteEntry As Date dteEntry = Date sql = "Insert Into tblFranchiseDiary...
  2. B

    Show last value in combo box

    Hi, By default, when a form opens, for a combo box, I want to show the last value in the list ie. the max of id field. How can I do this? The reason: There are values being entered in a form but then someone else uses that data and it would be good to load the last value rather than searching...
  3. B

    Code for opening report (DoCmd)

    Hi, I am trying to open a report based on a combo box value but cannot get it to work. The following code works; DoCmd.OpenReport "rpt1", acViewPreview, , "[CallReasonCode]='SS'" or DoCmd.OpenReport "rpt1", acViewPreview, , "[CallReasonCode]='VM'" but when I take the value from the...
  4. B

    Access 2010 Runtime DoCmd Issue

    Hi Everyone, Finally moved over to 2010 this week. Just created a simple db with a couple of forms, saved as accdr and put on pc with Access runtime 2010. Issue: I cannot open a form as I can in accdb. I am using DoCmd to open the form. - it just does not open. Anyone seen anything like this...
  5. B

    Report Total using where clause

    Hi, I am trying to create a total in the footer by summing up fields in the detail area using a certain criteria. For example; The report has 3 fields: Name,Job Title, Days Worked. I want to sum all days worked "where Job Title = Gardener for example. Can anyone help? thanks
  6. B

    Nested for loop

    Hi all, I am trying to loop through a table (tblTest) with two fields fldNum1 and fldNum2. The table has 10 records. I want to loop through each flNum1 and in turn loop through fldNum2 and multiply fldNum1 by fldNum2 (10 records), then back up to fldNum1 row 2 and again multiply all fldNum2...
  7. B

    Text file on web server

    Hi, I am looking for a way for a user to check the latest versions of our Access db. When they log in to the db (which is a stand alone db on C drive) I want to run a routine that connects to our server via the internet and opens a text file to view the version eg . 4.13. I know how to open and...
  8. B

    Return a field name from function

    Hi everyone, hopefully someone can help me out this evening. I need to be able to return a field name to use in a query; I have query1 which returns a code eg.either 1001,1002,1003 etc and other data including price1,price2,price3,price4 I have a table holding info about the code...
  9. B

    Webservice from Access

    Hi I am trying to send some data from Access(generated by a query) to a bt web service (sms) Basically I am generating the name, phone number and message but I do not know how to get that data from within access to the web service/url. I want to be able to do this from vba behind a buttton click...
  10. B

    function error

    Hi, I have written the following function; Private Function GetMaxValue(ByRef strTable As String) As Long 'gets the number of records from table which will allow us to determine how many records to add Dim db As DAO.database Dim rs1 As DAO.Recordset Set db = CurrentDb() Set rs1 =...
  11. B

    Update table with values from another table

    hi, I am trying to update values in a table with the correct values from another table. The first column is an autonumber field and is linked to another table and so I cannot just delete the records and add new ones. I want to loop through table A and insert records to table B that have the...
  12. B

    Max of Count and date query

    Hi everyone, I am trying to create a query that will return 1 row as follows; I have a query with 2 fields: CountofSomething, AccDate I want to return the max(Countofsomething), AccDate I am getting the max for each date - I want the max count and the date for that field ie. one row (I am...
  13. B

    Open multiple databases

    Hi I would like to open several databases (up to 200). These have exactly the same tables. I would like to run a query on each database and append the data to another table in my new database ie. loop through databases run query A on table A Append to table B in my new database next This will...
  14. B

    return field name in query

    Hi, I am trying to return the name of a field if it meets my criteria eg. Field A = 25 Field B = 35 Field C = 30 If I want to return the field with the max. number I would like Field D to say "Field B" Hope I've explained well enough - Thanks
  15. B

    write conflict

    I have a form and subforms on a 3 page tab. There are calculated controls on the form and data inputted to the form is also read by various queries in the background. When I change certain values and then save changes and come out of form or even just click on subform area, I get a 'Write...
Top Bottom