Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Click & Message if fields match

Status
Not open for further replies.

kermit01de

Technical User
Jan 20, 2002
256
DE
Unfortunately I do not find any hint for what I am trying to do:

Having two tables FE_Version and Config.
Both have field Version - if they match everything is fine.

I would like to have a button "Check Version" that checks the fields and pops up a message saying "Please update your frontend" if they do not match.

What I tried:
Private Sub Bezeichnungsfeld59_Click()
If FE_Version!Version <> Config!Version Then
MsgBox "Ungleich" & FE_Version!Version & "-" & Config!Version
Else
MsgBox "Gleich" & FE_Version!Version
End If
End Sub

That does not work. Any hint for me?


--------------------------------------
>>>>>> Bugs will appear in one part of a working program when another 'unrelated' part is modified <<<<<
 
There are several possible solutions. Could you tell us more detail on how it doesn't work. Does it give an error message, accept non-matching entries or report a mismatch when the entries are the same?

Geoff Franklin
 
In this example it gives error 424 - on the first line:

Object required


--------------------------------------
>>>>>> Bugs will appear in one part of a working program when another 'unrelated' part is modified <<<<<
 
Got it finally ...

Dim dbs As Database, rst As Recordset
Dim Feld As Field
Dim Name As String

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT FE_Version.Version FROM FE_Version INNER JOIN Config ON FE_Version.Version = Config.Version;")
If rst.RecordCount = 0 Then
MsgBox "Eine neue Version ist vorhanden - bitte L&B beenden und neu starten"
End If


--------------------------------------
>>>>>> Bugs will appear in one part of a working program when another 'unrelated' part is modified <<<<<
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top