0

I am fairly new with Access so please forgive my newness. The database I am working on is to calculate pay based on piecework from subcontractors. I have been using DLookup to pull the quantity of boards needed for each of the house models on the form, which is working great.

(=DLookUp("KDQty","ModelT","ModelID=" & Nz([ModelCombo],0))

The issue I am having is when the user needs to change the quantity of boards (i.e. when a subcontractor has done a partial job, or at times there are 2 options for the type of finishing to be used and only 1 will be used, so one of the quantities will need to be changed to 0 for the quantity).

What is the best (and easiest) way to pull this information in and yet allow it to be editable? Please let me know what other information you may need. Thanks very much for your suggestions and patience.

I tried DLookup based on a combo box for that model and since DLookup does not allow edits to that control, that is the problem.

Suggestions I was given included trying to use an unbound textbox and set the value to DLookup with an AfterUpdate event asking if the field should be updated - I could not get that to work.

2
  • Use a BOUND textbox and code to set its value when house model is selected if textbox is blank. Your question really is too broad and does not show code attempt to solve issue. Commented Aug 30, 2024 at 5:29
  • Don't really need DLookup. Include KDQty field in combobox RowSource then reference that column by index to populate BOUND textbox. If KDQty is third column, its index is 2: If Nz(Me.textboxname, 0) = 0 Then Me.textboxname = Me.ModelCombo.Column(2). Use combobox AfterUpdate event or textbox GotFocus event. Commented Sep 4, 2024 at 4:10

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.