Below is the code I have on an AfterUpdate Event from a ComboBox. It populates unbound fields on the form from a query. This works find. My issue is-until I select a Partnumber from the ComboBox none of the unbound fields on the form show. The Form is Blank. How can I have all of the fields on the form show without selecting a partnumber from the ComboBox? The Form is a Single Form.
Code:
Private Sub PartNumberSelect_AfterUpdate()
Forms("MainEntryFrm").Requery
Me.PartNumber10 = DLookup("PartNumber", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.PrimarySupplier10 = DLookup("PrimarySupplier", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.OPERATION10 = DLookup("Operation", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.FrozenUsage10 = DLookup("FROZEN_USA", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.KBQty10 = DLookup("KANBAN_QTY", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.FrozenKbQty10 = DLookup("KB_QUANTIT", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.CONTAINER10 = DLookup("CONTAINER_", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.PiecesPer10 = DLookup("PIECES_PER", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.NumberContainers10 = DLookup("NUMBER_OF", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
Me.PullStep10 = DLookup("SURROGATE_", "MainEntryQrySelect", "Surrogate_ = 1 or Surrogate_ is null")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Me.PartNumber20 = DLookup("PartNumber", "MainEntryQrySelect", "Surrogate_ = 2")
Me.PrimarySupplier20 = DLookup("PrimarySupplier", "MainEntryQrySelect", "Surrogate_ = 2")
Me.OPERATION20 = DLookup("Operation", "MainEntryQrySelect", "Surrogate_ = 2")
Me.FrozenUsage20 = DLookup("FROZEN_USA", "MainEntryQrySelect", "Surrogate_ = 2")
Me.KBQty20 = DLookup("KANBAN_QTY", "MainEntryQrySelect", "Surrogate_ = 2")
Me.FrozenKbQty20 = DLookup("KB_QUANTIT", "MainEntryQrySelect", "Surrogate_ = 2")
Me.Container20 = DLookup("CONTAINER_", "MainEntryQrySelect", "Surrogate_ = 2")
Me.PiecesPer20 = DLookup("PIECES_PER", "MainEntryQrySelect", "Surrogate_ = 2")
Me.NumberContainers20 = DLookup("NUMBER_OF", "MainEntryQrySelect", "Surrogate_ = 2")
Me.PullStep20 = DLookup("SURROGATE_", "MainEntryQrySelect", "Surrogate_ = 2")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Me.PartNumber30 = DLookup("PartNumber", "MainEntryQrySelect", "Surrogate_ = 3")
Me.PrimarySupplier30 = DLookup("PrimarySupplier", "MainEntryQrySelect", "Surrogate_ = 3")
Me.OPERATION30 = DLookup("Operation", "MainEntryQrySelect", "Surrogate_ = 3")
Me.FrozenUsage30 = DLookup("FROZEN_USA", "MainEntryQrySelect", "Surrogate_ = 3")
Me.KBQty30 = DLookup("KANBAN_QTY", "MainEntryQrySelect", "Surrogate_ = 3")
Me.FrozenKbQty30 = DLookup("KB_QUANTIT", "MainEntryQrySelect", "Surrogate_ = 3")
Me.Container30 = DLookup("CONTAINER_", "MainEntryQrySelect", "Surrogate_ = 3")
Me.PiecesPer30 = DLookup("PIECES_PER", "MainEntryQrySelect", "Surrogate_ = 3")
Me.NumberContainers30 = DLookup("NUMBER_OF", "MainEntryQrySelect", "Surrogate_ = 3")
Me.PullStep30 = DLookup("SURROGATE_", "MainEntryQrySelect", "Surrogate_ = 3")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Me.PartNumber40 = DLookup("PartNumber", "MainEntryQrySelect", "Surrogate_ = 4")
Me.PrimarySupplier40 = DLookup("PrimarySupplier", "MainEntryQrySelect", "Surrogate_ = 4")
Me.OPERATION40 = DLookup("Operation", "MainEntryQrySelect", "Surrogate_ = 4")
Me.FrozenUsage40 = DLookup("FROZEN_USA", "MainEntryQrySelect", "Surrogate_ = 4")
Me.KBQty40 = DLookup("KANBAN_QTY", "MainEntryQrySelect", "Surrogate_ = 4")
Me.FrozenKbQty40 = DLookup("KB_QUANTIT", "MainEntryQrySelect", "Surrogate_ = 4")
Me.Container40 = DLookup("CONTAINER_", "MainEntryQrySelect", "Surrogate_ = 4")
Me.PiecesPer40 = DLookup("PIECES_PER", "MainEntryQrySelect", "Surrogate_ = 4")
Me.NumberContainers40 = DLookup("NUMBER_OF", "MainEntryQrySelect", "Surrogate_ = 4")
Me.PullStep40 = DLookup("SURROGATE_", "MainEntryQrySelect", "Surrogate_ = 4")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Me.PartNumber50 = DLookup("PartNumber", "MainEntryQrySelect", "Surrogate_ = 5")
Me.PrimarySupplier50 = DLookup("PrimarySupplier", "MainEntryQrySelect", "Surrogate_ = 5")
Me.OPERATION50 = DLookup("Operation", "MainEntryQrySelect", "Surrogate_ = 5")
Me.FrozenUsage50 = DLookup("FROZEN_USA", "MainEntryQrySelect", "Surrogate_ = 5")
Me.KBQty50 = DLookup("KANBAN_QTY", "MainEntryQrySelect", "Surrogate_ = 5")
Me.FrozenKbQty50 = DLookup("KB_QUANTIT", "MainEntryQrySelect", "Surrogate_ = 5")
Me.Container50 = DLookup("CONTAINER_", "MainEntryQrySelect", "Surrogate_ = 5")
Me.PiecesPer50 = DLookup("PIECES_PER", "MainEntryQrySelect", "Surrogate_ = 5")
Me.NumberContainers50 = DLookup("NUMBER_OF", "MainEntryQrySelect", "Surrogate_ = 5")
Me.PullStep50 = DLookup("SURROGATE_", "MainEntryQrySelect", "Surrogate_ = 5")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
End Sub