G
Guest
Hi there,
I have beend fixing up some db design lately and in doing so have a couple of ?? someone out there might be able to help.
1st question, I was using autonumber to assign a ReceiptNo, but found using a variable and incrementing it using code works better for me (for other funtions of ReceiptNo). Following is what I am using,
NextReceipt = DMax("[ReceiptNo]", "tblReceipts") + 1
I'm not sure how to initialize the 1st receiptno though, if the table is empty (which it will be for start w client) then I get an error when this is used, 'Invalid use of Null'. How do I set the first number for this calculation to use? (Also can it be set to i.e. 1000).
2nd question, more about the db design cleanup (discussed in previous posts - thanks again Steve). I have a table POLine, where a client would choose an item description to order using a combobox which was build based on the lookupwizard in the table POLine for the description field. What is being stored in the description field though is the itemno. I was reffered to an address to view the perils of using the lookup wizard - and I have decided I don't want to go this route, but now I am not sure how to proceed. Meaning- on my POline form, how can I get the user to be able to choose an item (from the item master table) to order. My brain isn't functioning right - because I'm sure this is a query of sorts?
Thanks in advance
Joan
I have beend fixing up some db design lately and in doing so have a couple of ?? someone out there might be able to help.
1st question, I was using autonumber to assign a ReceiptNo, but found using a variable and incrementing it using code works better for me (for other funtions of ReceiptNo). Following is what I am using,
NextReceipt = DMax("[ReceiptNo]", "tblReceipts") + 1
I'm not sure how to initialize the 1st receiptno though, if the table is empty (which it will be for start w client) then I get an error when this is used, 'Invalid use of Null'. How do I set the first number for this calculation to use? (Also can it be set to i.e. 1000).
2nd question, more about the db design cleanup (discussed in previous posts - thanks again Steve). I have a table POLine, where a client would choose an item description to order using a combobox which was build based on the lookupwizard in the table POLine for the description field. What is being stored in the description field though is the itemno. I was reffered to an address to view the perils of using the lookup wizard - and I have decided I don't want to go this route, but now I am not sure how to proceed. Meaning- on my POline form, how can I get the user to be able to choose an item (from the item master table) to order. My brain isn't functioning right - because I'm sure this is a query of sorts?
Thanks in advance
Joan