Display certain part of record when number is entered

G

Guest

I have a form where I enter a unique number and certain details are displayed
from a look up table. What I want to do is display certain parts of the
record according to the unique number also I would like a message to appear
to show this is a different type of record. Please help!!!
 
J

John Vinson

I have a form where I enter a unique number and certain details are displayed
from a look up table. What I want to do is display certain parts of the
record according to the unique number also I would like a message to appear
to show this is a different type of record. Please help!!!

You'll need to either write a query or VBA code to display the parts
you want to see.

If you would like a more specific answer, please post a more specific
question. We cannot see your database and have no way to know what
"parts" you mean, or what you want to accomplish.

John W. Vinson[MVP]
 
G

Guest

The purpose of the Database is to produce forms for Batch Processing and
labelling of medicines. The Database contains a lookup table so when a record
is searched on the from the relevant details appear. Also there are other
fields that have to be filled in by the user.

What I would like to do is when a particular product is searched for - I
want the form to disable certain sections of the form so data cannot be
entered. I want to disable a few text boxes & labels. The reason for this is
that some medicines are fridge items and additional details need to be
entered for this, but when it is not a fridge item I want certain controls to
be disabled so data cannot be entered. Additionally is it possible to get a
warning sign to say “this is a fridge line productâ€.
 
J

John Vinson

What I would like to do is when a particular product is searched for - I
want the form to disable certain sections of the form so data cannot be
entered. I want to disable a few text boxes & labels. The reason for this is
that some medicines are fridge items and additional details need to be
entered for this, but when it is not a fridge item I want certain controls to
be disabled so data cannot be entered. Additionally is it possible to get a
warning sign to say “this is a fridge line product”.

Yes, you can do this - for instance in the Current event of the Form
(which will fire when a new record is displayed, whether it's from a
search or from moving to a record with the navigation buttons). For
instance

Private Sub Form_Current()
If Me.Refrigerated = True Then
Me!txtThisControl.Enabled = False
Me!txtThatControl.Enabled = False
Me!lblThisLabel.Caption = "This is a fridge line product"
Me!lblThisLabel.Forecolor = vbRed
Else
Me!txtThisControl.Enabled = True
<and so on>
End If
End Sub

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top