I want to check whether that data entered is in that table or not in MS
ACCESS...
I am using MS ACCESS to create my application....
May i know the way?
|
|
0
|
|
|
|
Reply
|
EMILYTAN
|
4/13/2007 5:26:37 AM |
|
Use DLookup() to see if the data is already in the table.
Details in:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html
--
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.
"EMILYTAN" <u33296@uwe> wrote in message
news:70a0683bf30a2@uwe...
>I want to check whether that data entered is in that table or not in MS
> ACCESS...
> I am using MS ACCESS to create my application....
> May i know the way?
>
|
|
0
|
|
|
|
Reply
|
Allen
|
4/13/2007 5:35:55 AM
|
|
thanks...i will try on it...
Allen Browne wrote:
>Use DLookup() to see if the data is already in the table.
>
>Details in:
> Getting a value from a table: DLookup()
>at:
> http://allenbrowne.com/casu-07.html
>
>>I want to check whether that data entered is in that table or not in MS
>> ACCESS...
>> I am using MS ACCESS to create my application....
>> May i know the way?
|
|
0
|
|
|
|
Reply
|
EMILYTAN
|
4/13/2007 7:00:41 AM
|
|
Hi Allen,
Can I know how to write the code when i click a button, it will auto check
whether that data is there, if there is, it will prompt a message "valid"
else "invalid".......?
Allen Browne wrote:
>Use DLookup() to see if the data is already in the table.
>
>Details in:
> Getting a value from a table: DLookup()
>at:
> http://allenbrowne.com/casu-07.html
>
>>I want to check whether that data entered is in that table or not in MS
>> ACCESS...
>> I am using MS ACCESS to create my application....
>> May i know the way?
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200704/1
|
|
0
|
|
|
|
Reply
|
EMILYTAN
|
4/13/2007 7:56:36 AM
|
|
Yes: you can do that in the BeforeUpdate event procedure of your form.
We can't write your code for you, so if you don't know anything about
writing code, you will have some learning to do to get there.
--
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.
"EMILYTAN via AccessMonster.com" <u33296@uwe> wrote in message
news:70a1b73d32cce@uwe...
> Hi Allen,
> Can I know how to write the code when i click a button, it will auto check
> whether that data is there, if there is, it will prompt a message "valid"
> else "invalid".......?
>
> Allen Browne wrote:
>>Use DLookup() to see if the data is already in the table.
>>
>>Details in:
>> Getting a value from a table: DLookup()
>>at:
>> http://allenbrowne.com/casu-07.html
>>
>>>I want to check whether that data entered is in that table or not in MS
>>> ACCESS...
>>> I am using MS ACCESS to create my application....
>>> May i know the way?
|
|
0
|
|
|
|
Reply
|
Allen
|
4/13/2007 1:50:57 PM
|
|
I wrote this code:-
InRemarks.SetFocus
Result = DLookup("[JobNumber]", "OpenJob", "[JobNumber] = " &
InRemarks.Text)
MsgBox Result
I briefly explain how it flow. I will key in the job number in the InRemarks.
Text and when i click a button, it should be able to display the result that
has the record...
However, when i key in the job number it turn to be an error display data
type mismatch criteria expression and when i key in alpha numeric it display
you cancelled previous operations....
Why?
Allen Browne wrote:
>Yes: you can do that in the BeforeUpdate event procedure of your form.
>
>We can't write your code for you, so if you don't know anything about
>writing code, you will have some learning to do to get there.
>
>> Hi Allen,
>> Can I know how to write the code when i click a button, it will auto check
>[quoted text clipped - 12 lines]
>>>> I am using MS ACCESS to create my application....
>>>> May i know the way?
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200704/1
|
|
0
|
|
|
|
Reply
|
EMILYTAN
|
4/16/2007 7:31:31 AM
|
|
If you open the OpenJob table in design view, what data type is the
JobNumber field?
If Text, try:
Dim strWhere As String
Dim varResult as Variant
strWhere = "[JobNumber] = """ & Me.InRemarks & """"
varResult = DLookup("[JobNumber]", "OpenJob", strWhere)
MsgBox "Searched where " & strWhere & vbCrLf & _
"Result: " & varResult
If the field is a Number type, change line 3 to:
strWhere = "[JobNumber] = " & Nz(Me.InRemarks,0)
--
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.
"EMILYTAN via AccessMonster.com" <u33296@uwe> wrote in message
news:70c73745aa226@uwe...
>I wrote this code:-
>
> InRemarks.SetFocus
> Result = DLookup("[JobNumber]", "OpenJob", "[JobNumber] = " &
> InRemarks.Text)
> MsgBox Result
>
> I briefly explain how it flow. I will key in the job number in the
> InRemarks.
> Text and when i click a button, it should be able to display the result
> that
> has the record...
> However, when i key in the job number it turn to be an error display data
> type mismatch criteria expression and when i key in alpha numeric it
> display
> you cancelled previous operations....
> Why?
>
> Allen Browne wrote:
>>Yes: you can do that in the BeforeUpdate event procedure of your form.
>>
>>We can't write your code for you, so if you don't know anything about
>>writing code, you will have some learning to do to get there.
>>
>>> Hi Allen,
>>> Can I know how to write the code when i click a button, it will auto
>>> check
>>[quoted text clipped - 12 lines]
>>>>> I am using MS ACCESS to create my application....
>>>>> May i know the way?
|
|
0
|
|
|
|
Reply
|
Allen
|
4/16/2007 9:58:22 AM
|
|
OH THANK YOU! It can work already! Thanks for helping!
Allen Browne wrote:
>If you open the OpenJob table in design view, what data type is the
>JobNumber field?
>
>If Text, try:
> Dim strWhere As String
> Dim varResult as Variant
> strWhere = "[JobNumber] = """ & Me.InRemarks & """"
> varResult = DLookup("[JobNumber]", "OpenJob", strWhere)
> MsgBox "Searched where " & strWhere & vbCrLf & _
> "Result: " & varResult
>
>If the field is a Number type, change line 3 to:
> strWhere = "[JobNumber] = " & Nz(Me.InRemarks,0)
>
>>I wrote this code:-
>>
>[quoted text clipped - 25 lines]
>>>>>> I am using MS ACCESS to create my application....
>>>>>> May i know the way?
--
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
EMILYTAN
|
4/17/2007 1:31:07 AM
|
|
|
7 Replies
131 Views
(page loaded in 0.189 seconds)
Similiar Articles: Check to see whether a table contains a set of fields already ...How to make check box for select specific field form table ... Check to see whether a table contains a set of fields already ..... data table vs ... make check box for ... Changing database collation for existing databases - microsoft ...> Assuming this works (from MVP blog, but will be testing!), I just > wanted to check whether there was any possiblility of data loss when > using the ALTER TABLE ... check if column exists in table - microsoft.public.access ...Check to see whether a table contains a set of fields already ... Find Out Whether a Specific ... vbs to read 3rd column field data & check if exist in other ... VBS Script to ... How to make check box for select specific field form table ...Check to see whether a table contains a set of fields already ... Check to see whether a table contains a set of fields already ..... data table vs ... make check box for ... Check data range and return false value if a cell is blank ...... Complete") Note that this will only check for blank cells - it won't check whether the cell contents are valid data ... blank table row - microsoft.public.word.vba ... Checkbox column in a table - microsoft.public.access.queries ...Tables are designed for data *storage*, not for data ... that, it makes no difference whether the table ... table lists the values for the check boxes. The CheckBox table ... Can't filter reports on custom fields. Any ideas? - microsoft ...... pivot" this list for a variety of reports ... not be changed after creating the report. Check whether all the field ... Pivot Table Filter ... data using date filter ... check mark to filter data or not - microsoft.public.access.queries ...... below to allow all the records to be displayed if the check mark is off? In other words, I have a table ... So, it will return all records regardless of whether check0 is ... How to tell when a transaction has been rolled back? - microsoft ...... that uses a transaction to insert a row into a table. I need to tell somehow by looking at my sample data whether ... If so, this not the way to check the last identity ... "the data has been changed" - microsoft.public.access ...... Access front end on a LAN using ODBC linked tables. Users are periodically getting the data ... Sub What I need is for additional code to check whether the retrieved data ... How To Check If Specified Table Exists In SQL Server DatabaseAs SQL Server provides ultimate User Interface using which you can check whether any of your Database contains specific Table or not. But some times you need to check ... How to check whether the values of all fields in a Repeating Table ...This article shows you how to use Data Validation rules or Conditions on Rules in InfoPath to check whether all of the fields in a repeating table on an InfoPath form ... To check whether data table is exist or notHi, I am trying to write the code using c#. Needed code to check whether the particulare data table from a database is exist or not. If not then create the table. java - check whether the data is already exist in table, or to ...friends, I need help in sqlite query for check whether the data is already exist in table, or to check table is empty or not,let's give queries for it. sybase: How to check whether the data rows in a table are actually ...database.itags.org: sybase question: How to check whether the data rows in a table are actually sorted or not, created at:Fri, 23 May 2008 10:27:00 GMT with 1,406 ... 7/26/2012 9:33:13 PM
|