Search results

  1. B

    Solved Modify backcolor of a text field

    Dear readers How can I modify textfield.backcolor via a function? I use Public Function ChangeColorDropDown(Variable As Variant, Backcolor As Long, Forecolor As Long) If IsNull(Variable) Then Backcolor = vbRed Forecolor = vbWhite Else Backcolor = vbWhite...
  2. B

    Solved How to access dynamically form recordsource fields

    Dear readers I have in my form a recordsource containing several columns with nearly identical names DR01, DR02, DR03 etc. How can I use this dynamically in VBA with a counter? So when it is a field on the form, one can use for counter = 1 to 10 ME(“DR0” & counter) Next counter But what...
  3. B

    Solved Query question

    Dear readers, A question I am dealing with for a long time now As company we are controlling all kind of emission. Each year we are improving and each year the government decreases the limits to motivate companies to continuous improvement. So far so good In reality we have a lot of data, but I...
  4. B

    Access 64bits database running on 32bits clients possible

    Dear ACCESS experts, I am still developing in ACCESS 2010, 32 bits (sorry, but we are not a very rich company :) ) My "development server" (an old HP proliant, RAID 1, retired already 5 years ago as fileserver) is still servicing me, but is showing some red LED's which indicates me the disks...
  5. B

    Find Max dates/times group by position

    Dear Query experts, In the below example I am able to get the correct answer, but I have the feeling my method is too complex A very simplified example is the results of a UNION query (records are coming from different tables) Query1 Position ; DateTime ; Value 242 ; 26-12-2019 10:00 ; 1...
  6. B

    which event detects column change in datasheet?

    Dear readers When using a datasheet form, I want to present the user a description of the column he is working in. I was thinking to use an event of the datasheet when the user changes columns. This event will then run a function where I look what the name is of the activecontrol / column and...
  7. B

    inconsistent state and network

    Dear readers, In several years I have seen many "inconsistent state" messages from all the databases running on our network. I have all the data in SQL server, I have my workarounds to start up within 10 seconds, so after multiple years I don't really care any more. I'll survive. But still I...
  8. B

    problems dropdown box in datasheet with linked tables

    Dear readers I guess a difficult question here. I have tried to find a solution for many hours now but have only been able to create a workaround. I have created and attached a strongly simplified version of a database I have developed for the company. Mainform with subform In the Subform I...
  9. B

    User-defined type not defined

    Dear readers I have a simple function top open multiple forms. It works but it gives me an error on the first line when I try to compile my database Compile error: User-defined type not defined Dim frmInstance As New Frm_Myform DoCmd.OpenForm frmInstance What to do to avoid the compile...
  10. B

    conditional format in datasheet

    Dear readers I have a table with ID status color 1 approved 65280 (=green) 2 rejected 255 (=Red) etc In a datasheets some documents have status approved, some have status rejected (and many more statuses) Is it possible to have the conditional format...
  11. B

    How to make Additions in form1 visible in form2

    Dear readers Possible I am overlooking something which is very simple. Hence this question I have two forms: form1 where a quality (QC) department is entering measurements form2 where the production is reading the measurements and entering adjustments I have no problems with locks or...
  12. B

    Cleaning up Access databases

    Dear readers, I have inherited multiple databases several years ago, have updated them with own developments and am now sitting with a lot of different name conventions for columns (not exactly my fault!) For example: in one table, there is used "maskin" for "position", in another "pos", in a...
  13. B

    Compare two rows with each other

    Dear readers I am looking for a way to optimize some queries My (example) table is ID I Date1 I Val1 010 I 01-03 I 1 019 I 02-03 I 0 167 I 03-03 I 4 472 I 04-03 I 5 etc, so multiple more records... I creates a compare SQL between the two records with a nested SQL SELECT DATE1, VAL1...
  14. B

    Sorting Norwegian weeknumbers

    Dear readers I have a query get a weekaverage of a value. SELECT Format([Testdate],"ww",2,2),2) AS wknum, Avg([testvalue]) AS AvgVar FROM testtable GROUP BY Format([Testdate],"ww",2,2),2) ORDER BY Format([Testdate],"ww",2,2),2) unfortunately, the 1-JAN-2017 is week 52. How can I order this...
  15. B

    Enter Parameter value on startup

    Dear fellow developers When I develop, I sometimes create a new version of a form. For example I make a copy from frm_formV1 to frm_formV2 But in this case the frm_formV2 opens with a message box ENTER PARAMETER VALUE forms!frm_formV1!test_date I understand the message, I need to update...
  16. B

    Query to get value and previous value in 1 row

    Dear readers I have a simple table with columns ID, Val and prod Table1 ID val Prod 1 1 A 2 2 B 3 3 A 4 2 B 5 3 A 6 2 B 7 9 A 8 2 B 9 3 B 10 4 A 11 5 A 12 6 B 13 4 B I would like to query the data in Access to get as result the following table - filtered by prod = “A” - Column Val - 1 extra...
  17. B

    Access graph not configurable vba at first time?

    Dear readers I am working with Access 10, version 14.0.6023 I use a MSGraph.Chart.8 In VBA code I build a query which I connect to Graph47.RowSource = SQLStr I have a field on my form: frm_cnt.value = graph47.SeriesCollection.Count At the first time use, The graph shows the correct data: 3...
  18. B

    Performance issue with export to Excel

    Dear readers, I have a query generating from 100 to 80.000 records, even more The problem is that the performance is low when trying to export the data to Excel, even if the number of records is low I have tried several test, but I do not see a big difference in performance. Is there anybody...
  19. B

    Mainform fields fixed while subform datasheet can scroll

    Dear readers, I have a simple datasheet subform in a mainform in the datasheet I show multiple columns, in the mainform I show the totals for some of the columns. For example as in capture 1 The totals are located straight above the columns of the datasheet. But if you move the cursor in the...
  20. B

    Format string date to normal date

    Dear readers I am stuck to a logging system which stores dates in a text format like Datestr = ‘09-MAY-16 21:41:01.3’ I have computers which are configured as Norwegian, English, French Problem with Norwegian is for example that the month MAY is not recognized (because Norwegion is written as...
Top Bottom