Access2base macro

classic Classic list List threaded Threaded
1 message Options
nixonshaun nixonshaun
Reply | Threaded
Open this post in threaded view
|

Access2base macro

This post has NOT been accepted by the mailing list yet.
Hi everyone.
I am starting  to try out Libre Office Base (5) as opposed to Access 2007.
I am in the process of re-creating a database i made years ago and having some trouble even using Access2base.
most of my simple macros work well, to openforms, close database, open automatically on a certain form.
the database is simple it consists of 8 tables many of which have only 2 fields.  6 of the tables follow Marvel's super hero power grid.
Intelligence, Strength, Speed, Durability, Energy projection, and fighting ability.  these all have an ineger ID and another field, e.g. t ID and Intelligence.
Each table has around 7 entries.
for example Intelligence would be  something like
ID
1  slow
2 normal
3  learned
4 gifted
5 genius
6 super genius
7 omniscient

they all follow the same pattern.  the last 2 tables are a hero table and a villain table.
each one has an ID Name and Picture field and then lookup lists for each of the tables mentioned above.  for example if you click on the drop down for intelligence you can choose what level of intelligence the person is and it will assign the corresponding number to the same field on the Hero table  so if i chose learned it would record a 3 in the intelligence field on the hero table.
same for villains.

i have another form where you can select a hero and a villain and match them up in vs mode.
the code i used in access looks like this:

Private Sub Command11_Click()
Dim strContent As String
strContent = Me.HeroName
If [Hintelli] + [Hstrength] > [Vintelli] + [Vstrength] Then
MsgBox "the following Contestant WINS: " & strContent & ""
Else: MsgBox "The following Contestant LOSES: " & strContent & ""
End If


i cant remember what StrContent=Me.HeroName was, it may be a table in the original access database which i no longer have on my computer.
i tried to tweak it for access2base but cant get it working.  The code above is a snippet with only four numeric four numeric fields being compared, i would like to add all 6 fields eventually.
any help would be appreciated.
shaun