As a part of a database that i am developing i have a function that i developed in Access 2010 . on presenting it to my Superiors i was asked to enhance the presentation or Display. i am just hoping someone can Point me the right direction..
so basically i am inserting some values from one table to the other. but i first run Loops to determine which field names match and copy from the Import table only those fields which match for the target table. so far it works perfectly. no Problems. i am displaying the matching field names in a msg box. the code for this field Name comparision is as follows:
now what my colleagues want is that this msg box is not sufficient.. they want a more detailed Display. maybe a form or a text file or something so that the user has a more clear Picture.
the Suggestion was to Show up all the fields of the target table and then Show the fields that matched as green or maybe a tick or checkmark.
i am sure this cannot be done in a msgbox. i know it sounds elegant and i am not sure it can be done. some colleagues say it can be.
can somebody Point me in the right direction or some Suggestion please. i am not experianced enough in Access, so this would be a learning experiance..
thanks in advance..
so basically i am inserting some values from one table to the other. but i first run Loops to determine which field names match and copy from the Import table only those fields which match for the target table. so far it works perfectly. no Problems. i am displaying the matching field names in a msg box. the code for this field Name comparision is as follows:
Code:
Private Sub Command50_Click() Dim n As Long Dim m As Long Dim Ret_Type As Integer Dim str As String Dim stp As String Dim mystr As String Dim mysas As String Dim rs As DAO.Recordset Dim rs1 As DAO.Recordset Set rs = CurrentDb.OpenRecordset("MLE_Table") Set rs1 = CurrentDb.OpenRecordset("tbl_Import") With rs For n = 0 To .Fields.Count - 1 str = CurrentDb().TableDefs("MLE_Table").Fields(n).Name With rs1 For m = 0 To .Fields.Count - 1 stp = CurrentDb().TableDefs("tbl_Import").Field(m).Name If str = stp Then mystr = mystr & str & ", " fnd = True Exit For End If Next m If Not fnd Then mysas = mysas & str & vbCrLf fnd = False End With Next n .Close End With Ret_Type = MsgBox("The Following Fields could not be found in your upload !!" & vbCrLf & mysas, vbOKOnly + vbExclamation, " MISSING DATA") End Sub
the Suggestion was to Show up all the fields of the target table and then Show the fields that matched as green or maybe a tick or checkmark.
i am sure this cannot be done in a msgbox. i know it sounds elegant and i am not sure it can be done. some colleagues say it can be.
can somebody Point me in the right direction or some Suggestion please. i am not experianced enough in Access, so this would be a learning experiance..
thanks in advance..
Comment