Different Aproach for displaying Company or Privat Contacts (1 Viewer)

silentwolf

Active member
Local time
Yesterday, 22:28
Joined
Jun 12, 2009
Messages
545
Hi again,

I have currently a main form that is displaying all Contact Records.
On that form I have a option Group that where I select if the contact is Private or a Company.

At present I drigger the textfields with following Code
Code:
Private Sub fraCompanyPrivate_Click()
    Select Case fraCompanyPrivate.value
        Case 1
'            Me!txtDisplayName.BackColor = fdBlue
            Me!txtFirstName.Visible = False
            Me!txtLastName.Visible = False
            Me!cboTitle.Visible = False
            Me!cboAnrede.Visible = False
            Me!txtUID.Visible = True
            Me!txtDisplayName.Visible = False
            Me!txtContactPerson.Visible = True
        Case 2
            Me!txtDisplayName.Visible = True
            Me!txtFirstName.Visible = True
            Me!txtLastName.Visible = True
            Me!cboTitle.Visible = True
            Me!cboAnrede.Visible = True
            Me!txtUID.Visible = False
            Me!txtContactPerson.Visible = False
        Case Else
    End Select
End Sub

That works ok.. but as the Company Contact has much less fields in relation to Salution or Title I was wondering what is the best approach to display either Company related Fields and Private Related Fields.. so there are not to many empty spaces in the Contact Form.

Cheers
 

Attachments

  • PrivateContact.JPG
    PrivateContact.JPG
    24.7 KB · Views: 119
  • Company_Records.JPG
    Company_Records.JPG
    20.8 KB · Views: 126

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:28
Joined
May 7, 2009
Messages
19,169
just display them (don't hide) whether private or company.
it is pleasing to the eye if there are lots of info in the form
rather than lot's of "gap" (like in the teeth?).
just add a field in your table (CoType, private or company)
and add combobox to your form to select private or company.
 

silentwolf

Active member
Local time
Yesterday, 22:28
Joined
Jun 12, 2009
Messages
545
oh ok thanks for your advice!
just add a field in your table (CoType, private or company)
Do you mean with a seperate table?
Or what datatype should that CoType be? At present it is a Yes No field
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:28
Joined
May 7, 2009
Messages
19,169
Information about a client/contact is on separate table.
if you are dealing with invoice, sales, services, etc.
you don't duplicate info already in the customer Information table.
you just save the CustomerID and create a query that will
join your transaction table with your customer table (on customerID).
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:28
Joined
Feb 19, 2002
Messages
42,981
Depending on how the form is organized, you may be able to create a square or rectangular shaped box that is the same color as the background. Then you can hide/show the box which will hide/show the data under it. In addition to the BeforeUpdate event of the combo, you will also have to hide/show in the Current event of the form.
 

silentwolf

Active member
Local time
Yesterday, 22:28
Joined
Jun 12, 2009
Messages
545
@ Pat Hartman,

ok thanks well I am still finding the best way of organising the form but that is definatelly a way I can try too.
 

Users who are viewing this thread

Top Bottom