Re: Input Box
From: Tom (anonymous_at_discussions.microsoft.com)
Date: 10/03/04
- Previous message: Allen Browne: "Re: Input Box"
- In reply to: Allen Browne: "Re: Input Box"
- Next in thread: Allen Browne: "Re: Input Box"
- Reply: Allen Browne: "Re: Input Box"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 3 Oct 2004 01:10:26 -0700
Thanks Allen
That does what I want.
If I want to expand this so that when
MsgBox "Already exists." appears the user is re-
prompted to enter a number, what is the best way to do
this?
TIA
Tom
>-----Original Message-----
>Dim strNum as String
>strNum = InputBox("What number?")
>If IsNumeric(strNum) Then
> It Not IsNull(DLookup("MyID", "MyTable", "[MyID] = "
& strNum)) Then
> MsgBox "Already exists."
> End If
>Else
> MsgBox "I said a number!"
>End If
>
>--
>Allen Browne - Microsoft MVP. Perth, Western Australia.
>Tips for Access users - http://allenbrowne.com/tips.html
>Reply to group, rather than allenbrowne at mvps dot org.
>
>"Tom" <anonymous@discussions.microsoft.com> wrote in
message
>news:21b201c4a915$af633ba0$a301280a@phx.gbl...
>> Advice on how to achieve the following would be
>> appreciated:
>>
>> Am using an input box into which the user enters a
>> reference number.
>>
>> After that number is entered I want to use Dcount or
>> DLookup to check if that number has previously been
>> entered into the table.
>>
>> TIA
>>
>> Tom
>
>
>.
>
- Previous message: Allen Browne: "Re: Input Box"
- In reply to: Allen Browne: "Re: Input Box"
- Next in thread: Allen Browne: "Re: Input Box"
- Reply: Allen Browne: "Re: Input Box"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|