Prompt User for a field

kitty77

Registered User.
Local time
Today, 05:12
Joined
May 27, 2019
Messages
716
If IsNull([sampleid2]) Then [field1] = [sampleid1] & ".RPT" Else [field1] = [sampleid1] & ".RPT" or [sampleid2] & ".RPT"

I have a command button that checks for the this. How can I have "the Else" prompt the user to select either [sampleid1] or [sampleid2]
 
Dim MyAnswer As String
MyAnswer = InputBox("Enter Sample ID")
Me.field1.Value = MyAnswer & ".RPT"

This works. But instead of the user having to input the value, is it possible to have them choose the value from [field3] or [field4]?
 
I think I got it... How can I change it to 1 or 2, instead of Yes or No?

Select Case MsgBox("Sample ID", vbYesNo, "testing")

Case Is = vbYes
[Field1] = [sampleid] & ".RPT"

Case Is = vbNo
[Field1] = [sampleid1] & ".RPT"

End Select
 
How can I change it to 1 or 2, instead of Yes or No?
You can use a Popup form instead of a message box. Or, you can look for a customized message box like this one.
 
Build your own form with a combobox holding the SampleIDs.
 
You can use a Popup form instead of a message box. Or, you can look for a customized message box like this one.
Thanks
 

Users who are viewing this thread

Back
Top Bottom