Using MS Access/ms access 2007

Advertisement


Question
1. how can i display the computer name on the screen once the user had logged in. I am able to display username as current user but i need to ad the computer name that was used to login.

2 I have a report that displays days overdue for payment (eg -18)which implies the client has 18 days BEFORE been over due. what i am trying to achieve is that if the customer has paid before overdue date then that overdue field is invisible and a label displays PAID. if the if the customer has not paid yet then the number of days due is displayed.

kindest regards

Answer
Hi Claire,

Thanks for the question.

1.  Google:

Microsoft Access VBA display computer name.  

There are a lot of links that should be able to guide you.  Unfortunately this is not my area of expertise.



2. Try the following.

Add a label to the report that says 'Paid'.  Make this label invisible (Properties > Format > Visible  = No) and place over the days overdue field.

Then on the OnFormat event (Details Section (bar) > Properties > Events > OnFormat > Click on the button with the 3 dots > Code Builder > OK)

Add the following code:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!Paid = "Paid" Then
   Me!Label26.Visible = True
   Me!DaysOverdue.Visible = False
Else
   Me!Label26.Visible = False
  Me!DaysOverdue.Visible = True
End If
End Sub

You will have to change the names of the fields above, to match the names of your fields.

Hope this is of some help.

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Julie Misson

Expertise

My area of expertise is Microsoft Access 2000-2007. I have been building microsoft databases for the past twelve years. I would be competent in answering questions from novice Access 2000 users to the more advanced including VBA. If I cannot help, I am more than likely be able to point you to websites that can.

Experience

I have a Microsoft Access business where I build database for small businesses. These are usually one off designs, where there is no off the shelf software avaliable to meet the business needs. I also teach Microsft Access to beginners. I am the owner of the www.simply-access.com website.

Education/Credentials
Self taught in Microsoft Access. Have done some units in normalisation and SQL, but most of what I know I have learnt from books originally and more recently the Internet.

©2016 About.com. All rights reserved.