Link Criteria

C

Chrissy

I have a field defined in a table as:

Field Size: Double
Format: 000000
Decimal Places: 2

I attempt to open an edit form from a view only form
using a command button. This all worked until I changed
the field InvNum (an invoice number) to two decimal
places (invoice number extension).

For example: when the InvNum was 123456, it would open
the new form to InvNum 123456 just fine. However, with
an InvNum of 123456.03 the form opens blank -- or if
InvNum is 123456.01 (I prevent 123456.00) it returns that
one. Records do exist for the InvNum with extension I
seek. I checked that first.

In sum, I need to link ANY InvNum and open the record as
requested by the full InvNum, to include right of
decimal. So, how do I link and return InvNum
123456.03 ???

My link is "stLinkCriteria = "[InvNum]=" & Me![InvNum]"

Thanks, Chrissy
 
J

John Vinson

I have a field defined in a table as:

Field Size: Double
Format: 000000
Decimal Places: 2

I attempt to open an edit form from a view only form
using a command button. This all worked until I changed
the field InvNum (an invoice number) to two decimal
places (invoice number extension).

I would STRONGLY - vehemently yet - suggest using a Field Type of
Currency, rather than any Number. Doubles (like Floats) are
approximations; 123456.01 is not stored exactly as that, it's perhaps
stored as 123456.0099999999384.

Better yet, use TWO fields; InvNum and InvSeq, Long INteger and
Integer respectively. You can make these a joint two-field Primary
Key.
 

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