Search results

  1. P

    Edit cells in csv file via VBA

    I have a csv file with exported data form Access. Problem is that I need to add 2 rows on top of the data in that csv. Simply push down all data I exported in that csv (including headers) and add 2 rows with specific values. I managed to write a vba to push whole data down by 2 rows, however...
  2. P

    SELECT INTO with Identity - getting error

    [SOLVED] SELECT INTO with Identity - getting error I'm getting an error (Undefined function 'IDENTITY' in expression) when trying to run this line: strSQL = "SELECT newID = IDENTITY(1, 1), Data.Company, Data.Title, Data.Fullname INTO [Data Export] FROM Data ORDER BY Data.ID" Also tried...
  3. P

    Export data fields based on checkboxes on Form

    I have a form with all table fields listed and check boxes next to them. What I'm trying to achieve is to export all data fields that user selects to txt file. Problem is it would need to check which check-box is picked, then export only these fields. How can I do that in VB? Could I write...
  4. P

    Reference to Form fields in Update

    Hi guys! I have another problem:o I have a two tables called "Data" and "Import" and a form called "Form_MappingTables". In this form I have two dropdown lists: Address1 and Address2. These are lists of fields from table "Import". I'm trying to write a function that inserts these two fields...
  5. P

    Update all fields in table

    I'm trying to run an update query on all fields in a table. Like for example, replace all Chr(10) or Chr(13) with a coma. It also needs to skip the ID field, as it is an autonumber. How can I do this? Here's my code, but it doesn't work.... Public Function GetRidOf_dollar() As Boolean...
  6. P

    Get table's field list in a new table

    I'm trying to get a list of fields in one table and create a new table with those fields. In a big picture - I'm working on a macro that will process data imported to the access db. I want to have a form that user can manually map the imported table fields to a table template and run macro that...
  7. P

    RegEx in TSQL

    Hi guys, I have this function in VB that I used in Access to replace all non-alphanumeric characters, including spaces and anything in brackets. Public Function charOnly3(inputString As String) As String Dim RE As Object Set RE = CreateObject("vbscript.regexp") RE.Pattern =...
  8. P

    How to run a number of queries in sequence?

    I do same thing each month and would like to make it easier/faster: is there a way to run many queries, one after another? I cannot use macro, cause Run SQL is restricted to 255 characters and my queries SQL codes are longer than that. Is here a way to run them in a row? Like run query1, wait...
  9. P

    Laptop or Ultrabook for MS Access work

    Guys, I'm after a laptop for Access databases work. Not 100% sure what specification would be best for it. I believe Access doesn't use HT? Does it mean that having 4 cores won't make difference compared to i7 dual core with HT? Would something like Dell XPS 13 MLK be ok for it? It's a...
  10. P

    Question "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry."

    "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry." I'm getting this error every time I'm trying to import large txt file to Access. I know it is common error, but any solution found on the net doesn't work here:( File has 500K or other one - 2M records. Even if I...
  11. P

    How to get rid of non - alpha-numeric characters?

    Guys, I was wondering if you could help me. I need to get rid of all non alpha numeric characters in fields. Do you know any quick way to do it? Please have in mind I'm not an expert in vb, so was looking for simpler way to do it, unless you could tell me what exactly write and where to put it...
  12. P

    Question Access runs slowly... CPU goes idle during query

    Hi guys, I have a strange problem, which is a real pain... after I build a query and click to view results Access starts to calculate it, then after few seconds all CPU cores go idle.. then stay idle for about 30-40 second, then finishes query calculation in next few seconds. Is that normal...
  13. P

    Best HDD/SSD for busy Access database?

    I have a question to you guys: what drive would be the best choice for database? I work with Access databases every day, building, merging, copying data between big files, millions records, etc. Some queries take ages to get results, so I thought I could use some SSD drives to make it work...
  14. P

    Update query: add random dates

    Guys I need help please! I have this function I added to modules, that adds random date in given range.. right? Pretty simple: Function RandomDateInRange(LowerDate As Date, UpperDate As Date) As Date RandomDateInRange = Int((UpperDate - LowerDate + 1) * Rnd + LowerDate) End Function Now, I...
  15. P

    How to strip down the postcode? I need to get district from it

    Guys, I need to pull the district from postcode, so it would be various length string, from 2 to 4, but basically all up to first space. How can I achieve this? I know how to cut out last 3 characters using right function, but how to cut left side up to first space?
  16. P

    How to get rid of spaces in fields?

    I know, it sounds funny - what I need is to get rid of spaces in fields in one column. Basically it is phone numbers, some have space like 0145 8877657. Thing is when I use replace function it crashes, cause it's 3 million records;) Is there any way I could use.. don't know .. update query...
  17. P

    Append Table - add only new rows (no duplicates)

    I must be tired or something, cause I cannot do something that is pretty simple:( Two tables, table1 and table2. Table2 has same rows as table1 + some new ones. I want to append table1 with only new rows based on primary key field - ID. So this query will add all rows from table2 to table1...
  18. P

    Report with different record source - possible???

    Is it possible to create a report that will have different record source depeneds on a combo field? If user picks "english" for example and clicks the button, it will open the report that is based on eng_query, if he picks biology, same report will open based on bio_query... How can I do that?
  19. P

    Question Expression too complex - multiple condition IIF - any other ways to do it?

    Guys, I need your help again:) I have a crosstab query and I want value field to be depanded to combo field on one form. I hope it makes sense. If user picks a name of the subject from combo field on one form it will opens report that is based on that crosstab query where value field compared to...
  20. P

    Calculated Text Box shows #Error - form based on crosstab query

    Hello everyone! this is my first post here - for a long time this forum was a great source of knowledge for me, so decided to register:) My problem: I have a form that shows results of crosstab query. In Detail section there are students names, their exam results, summary of results for each...
Top Bottom