Search results

  1. 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...
  2. P

    Update all fields in table

    Thanks:) I have another issue there. Same code, updating all fields in table that are "" or " " or " " It happens when I import tables from Excel, some fields are not null, but empty, or have one or two spaces. So I have this: Public Function GetRidOf_empty() As Boolean Dim fld As...
  3. P

    Update all fields in table

    Yep, it worked thank you! :) Can't believe it was all about quotes...
  4. P

    Update all fields in table

    In that code: For Each fld In db.TableDefs(tbl).Fields 'create an update SQL statement for each field If fld.Name <> ID Then strSQL = "Update [" & tbl & "] Set [" & fld.Name & "]= Replace([" & fld.Name & "],Chr(10),',')" 'run the query CurrentDb.Execute strSQL...
  5. P

    Update all fields in table

    Error: Cannot update 'ID'; field not updateable. I've put in condition but for some reason it doesn't work.
  6. P

    Update all fields in table

    Yes, but number of fields are unknown, so I want it to run for each field, but skip ID.
  7. P

    Update all fields in table

    I added my code above. I want it to run on all fields.
  8. 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...
  9. P

    Get table's field list in a new table

    Hmm... how can I pass over a field name being a field value from mapping table? I think I know how I'm gonna get this mapping table. But how am I going to use it later? I mean how can I then run append query that will append data from ImportTable IT to ProcessTable PT by appending MT.field1 to...
  10. P

    Get table's field list in a new table

    I've added a plan in previous post. Well, mapping table would have these: Col1 Col2 Add1 Address1 Add2 Address2 ... Tables names would be always the same - imported table would be something like InitialTable, mapping one - MappingTable, then results one would be ResultTable. All this...
  11. P

    Get table's field list in a new table

    Yep, I think this is what I wanted to achieve. A table with records where values will be field names from imported table. Sorry if I'm not explaining it correctly. If I had this, I would then create continuous form with field names and use would pick a fields from combo box of template table to...
  12. P

    Get table's field list in a new table

    If this was so easy, I would do that:)
  13. P

    Get table's field list in a new table

    I thought it would be best as imported table will be always different, will have diff number of fields. But, yes, you are right, this is really a lot easier, thanks:) How can I create a form with same number of combo boxes as fields in the imported table?
  14. 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...
  15. 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 =...
  16. P

    How to run a number of queries in sequence?

    I update all fields in a table, sometimes 30 so cannot reduce the length of queries. How can make it wait til one query finishes then start next one?
  17. P

    How to run a number of queries in sequence?

    So it works using my sample from above. Only thing is I need to make sure that each query finishes before next kicks in. It runs on 2M records database. How can I do it?
  18. P

    How to run a number of queries in sequence?

    Can I do this for example? I'm not sure if this is gonna work in sequence or all at once?
  19. P

    How to run a number of queries in sequence?

    AS far as I know openquery will run an existing query. I can do this already with macro, setting up loads of queries in a macro, but I don't want to create those queries and then run them, I would like to have all queries codes in my place. I guess it could be done in VB, but I don't know really...
  20. 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...
Back
Top Bottom