Search results

  1. G

    Appending Data from SQL Server into Access

    Hi, I have the following code Cn.CursorLocation = adUseServer Cn.Open "Driver={SQL Server};Server=MS-LON-APPS01;Database=Warehouse;Trusted_Connection=yes" Cn.CommandTimeout = 400 strSQL = "SELECT [Opco Code], [SAP Account ID], [Customer Name], [Invoice Number], [Product Group 4 ID], " _...
  2. G

    Having big problems with Variables

    Hi there, I have a form with various multi-select list boxes and I am trying to pass the values to a query This is the code for my list box: Private Sub lstOpCo_AfterUpdate() Dim OpCo_Criteria As String Dim ctl As Control Dim Itm As Variant ' Build a list of the selections. Set ctl =...
  3. G

    RunSQL Won't Work

    Hi there, I have the following code Function RvS_Reports() Dim vDBName As Variant Dim vRvS_Exports Dim vQuery As Variant Dim vQuery1 As Variant Dim sSQL1 As String vDBName = "C:\RvS Reporting Reconciliation\BE_RvS_Exports.mdb" Set vRvS_Exports = CurrentDb().OpenRecordset("tblRvS_Exports")...
  4. G

    Scrathing my head

    Hi there, I have the following Code DoCmd.SetWarnings False Dim vCircuit_Info Dim vCircuit_Info_ID As Integer Dim vCircuit_Info_Text As String Dim LineNo As Integer Set vCircuit_Info = CurrentDb().OpenRecordset("tblCircuit_Data") Do Until vCircuit_Info.EOF vReporting_ID = vCircuit_Info!ID...
  5. G

    Searching Text File

    Hi there, I have the following Code which currently seaches a text file and populates field 1 of my table with the City Name found Public Sub findtext() Dim buf As String Dim lngPtr As Integer Dim flgFound As String Dim rs As DAO.Recordset Dim db As DAO.database Set db = CurrentDb Set rs =...
  6. G

    Strip out text

    Hi there, I have several amounts of data which lokks like this Brazilië (Sao Paulo) What I need to do is strip out anything in brackets so I am left with Brazilië Any ideas? Thanks in advance Geoff
  7. G

    stLinkCriteria stupidity

    Hi there, I am being a complete dumbass, I have a form which I would like to open using the following criteria SAP_entity = Me![SAP_entity] - Number Type = "Revenue" - Text Field source = "ZZZ" - Text Field One day I'll manage to get my head around this syntax problems Thanks in advance Geoff
  8. G

    Relinking Tables etc

    Hi there, I am using the following code to check links on startup, the problem I am having is that it only sheck the links of Access tables and not xls or odbc tables, is there a way to modify the code to do this. Thanks in advance Geoff Option Compare Database Option Explicit Global...
  9. G

    Long File Names

    Hi there, I am using the following code to zip files. Function Zip_AvE_Databases() DoCmd.SetWarnings False Dim vDestination As String Dim vReporting Dim vReporting_Entity As Variant Dim vReporting_Folder As Variant Dim vFile_Long As Variant Dim vFile_Short As Variant Dim sWinZip As String...
  10. G

    SQL string

    Hi there, I am having problems with the following SQL sSQL = "INSERT INTO tblGrouped_RvS_Detail_Var_Crosstab ( reporting ) IN " & vDestination & _ "vReporting_Folder & 'AvE_' & vReporting_Entity & '.mdb' & _ "SELECT tblGrouped_RvS_Detail_Var_Crosstab.*...
  11. G

    Controlling Scroll Bars

    Hi there, I have a Main Form with 3 subforms, each of the three subforms have a Horizontal scroll bar, what i would like to do is that when you scroll with one of the scroll bars it moves the other 2 sub forms so that the columns in each are always lined up. Any ideas anyone. Thanks in...
  12. G

    Remove Text

    Hi there, I have various invoice numbers ABC111111 DE9999999 FG7777777 etc and I would like to remove all the text from tem so I am only left with the numbers. Any help appreciated Thanks Geoff
  13. G

    How can I strip out the text

    I have the following value V:\Neil\B4014_1.csv And I need to strip out the part between the Last "\" and the ".", So I am left with B4014_1 Any help much appreciated Thanks Geoff
  14. G

    Expression is too long

    I have the following calculation =IIf(DLookUp("[PresDD]","[qryEnergy_Report_Data_(Table_10)]","[Name] = 'Main Campus' And [Utility] = 'Heating'") > DLookUp("[PrevDD]","[qryEnergy_Report_Data_(Table_10)]","[Name] = 'Main Campus' And [Utility] = 'Heating'"),"An increase in consumption of " &...
  15. G

    Can't get code to work

    Too Few Parameters Hi there, I have the following code Option Compare Database Option Explicit Private Sub Create_30_Min_Data() Dim dbs As DAO.Database Dim rst1 As DAO.Recordset, rst2 As DAO.Recordset Dim i As Integer, timevar As Variant Dim strSQL As String strSQL =...
  16. G

    Message for Jon K

    Thanks for your help the other day with my subquery problem. it worked great. the problem I have now is that I need the same thing but need to be able to specify the start date of the year ie 01/06/02 to 31/05/03. also there may be more than one rate for each month, and I need to how the average...
  17. G

    Create Table

    I have a table of data with a column for the date followed by 48 colums for the half hour intervals for the day. what I need to do is to place this in a new table with only 2 columns 1 for the date and time and the second for the value. any ideas anyone thanks geoff
  18. G

    Sub Query Problem

    I am trying to create a query which shows the one yers rates against the others side by side. ie 31/01/02 5p 31/01/03 5.5p I am geting the data from one table which is a continuous list of month and rate. I tried the following query SELECT...
  19. G

    Need to loop through

    I am using the following code to delete a group of temporary tables, when a particular form is closed, the problem I am having is that not all the tables will exist. When a table doesn't exist the code stops running and the remaing tables are not deleted. I need a way to loop through until all...
  20. G

    Update Time Field

    Hi there, I have a table of data which contains a time field which I need to update, I have created a select query to find the records that need updating SELECT Format([Time],'nn') AS [Minute] FROM tblFlexima_Profile_Data WHERE (((Format([Time],'nn')) Between '16' And '45' And Not...
Top Bottom