Link Criteria

  • Thread starter Thread starter Chrissy
  • Start date Start date
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
 
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.
 
Back
Top