Form Properties

G

Guest

I am really new at this access game, I have created a combo box that looks
up my item numbers (ex. 131701111). But as soon as I enter the 1 it gives me
the first number that starts with a 1 and does not let me enter the rest of
the numbers. Is there a way to change this?

Also I wanted to be able to make one field dependant on another - for
example I have both a Discount$ and Discount% fields, I wanted to make it so
that you cannot give a dollar discount and a percent discount is there anyway
to do this?

Any help would be greatly apprecaited.
 
T

Tony Vrolyk

Are you sure the combo box is stopping you? Combo boxes by their nature
automatically fill in with the first matching record in their rowsource.
That doesn't mean you can't keep typing. As you type the combo box will
continue to find the next one that matches - just keep typing.

Sometimes people see the numbers filled in an immediately stop typing and
just assume they cant' continue typing. When I worked a help desk job once
we used GroupWise and they had a similar feature for typing in address in
the To: box (years before Outlook BTW). One person called to complain he
couldn't enter an address because it kept filling in a different one that
happend to mathc the first few characters. It was a good 5 minutes before I
could get him to understand that he just needed to KEEP TYPING!!

For the disocunt thing. you will need to do some coding. Are you comfortable
with that. In this exact scenario I store just the dollar discount and just
calculate the dollar amount when someone enters a percent. Then just clear
the percent if somone enters a dollar amount.

Format the percent text box as a percent. Then add something like the
following (this is air code, in other words may not be corret but is in the
ball park)

Private Sub txtDiscountPercent_AfterUpdate()
Me.txtDiscountPercent = Me.txtDiscountPercent / 100
Me.txtDiscountDollar = Me.txtPrice * Me.txtDiscountPercent
End Sub

Private sub txtDiscountDollar_AfterUpdate()
Me.txtDiscountPercent = Null
End Sub

Post again if you have more questions
Tony Vrolyk
 

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