
08-Nov-2005, 12:52 PM
|  | Guest | | | | | | | | | | informative Messagebox! I have a field that a employee enters an item. and another field that the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6852-informative-messagebox.htmlReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
employee enters the user of that item....
What I would to see is when a user enter enters an item, a popup will appear
and inform the user that there are several users of that item and list the
users e.g., if the employee enters printer xyz the following will appear!
printer xyz has 4 users
user1's name
user2's name
user3's name
user4's name *
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh! | 
08-Nov-2005, 12:52 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! Try this code
Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
Set MyDb = currentdb
Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
Me.Item & "'")
If not MyRec.Eof then
Myrec.MoveLast
MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
MyRec.movefirst
While Not MyRec.Eof
MyStr = MyStr & vbCrLf
MyStr = MyStr & MyRec.[User_Name]
MyRec.MoveNext
Wend
End If
I didn't try the code, so you might get an erorr, also change the fields and
table name according to your data
This code need to be on the after update event of the Item field
--
The next line is only relevant to Microsoft''s web-based interface users. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck
"JOM" wrote:
> I have a field that a employee enters an item. and another field that the
> employee enters the user of that item....
> What I would to see is when a user enter enters an item, a popup will appear
> and inform the user that there are several users of that item and list the
> users e.g., if the employee enters printer xyz the following will appear!
>
> printer xyz has 4 users
> user1's name
> user2's name
> user3's name
> user4's name | 
08-Nov-2005, 12:52 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! I forgot to put the message box before the End if
MsgBox MyStr
--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck
"Ofer" wrote:
> Try this code
>
> Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
> Set MyDb = currentdb
> Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> Me.Item & "'")
> If not MyRec.Eof then
> Myrec.MoveLast
> MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
> MyRec.movefirst
> While Not MyRec.Eof
> MyStr = MyStr & vbCrLf
> MyStr = MyStr & MyRec.[User_Name]
> MyRec.MoveNext
> Wend
> End If Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
>
> I didn't try the code, so you might get an erorr, also change the fields and
> table name according to your data
> This code need to be on the after update event of the Item field
>
> --
> The next line is only relevant to Microsoft''s web-based interface users.
> If I answered your question, please mark it as an answer. It''s useful to
> know that my answer was helpful
> HTH, good luck
>
>
> "JOM" wrote:
>
> > I have a field that a employee enters an item. and another field that the
> > employee enters the user of that item....
> > What I would to see is when a user enter enters an item, a popup will appear
> > and inform the user that there are several users of that item and list the
> > users e.g., if the employee enters printer xyz the following will appear!
> >
> > printer xyz has 4 users
> > user1's name
> > user2's name
> > user3's name
> > user4's name | 
08-Nov-2005, 12:52 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! I have tried it but am having an error in the following line
Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
Me.Item & "'")
its saying that I need a list separator or )
"Ofer" wrote:
> Try this code
>
> Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
> Set MyDb = currentdb
> Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> Me.Item & "'")
> If not MyRec.Eof then
> Myrec.MoveLast
> MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
> MyRec.movefirst
> While Not MyRec.Eof
> MyStr = MyStr & vbCrLf
> MyStr = MyStr & MyRec.[User_Name]
> MyRec.MoveNext
> Wend
> End If
>
> I didn't try the code, so you might get an erorr, also change the fields and Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> table name according to your data
> This code need to be on the after update event of the Item field
>
> --
> The next line is only relevant to Microsoft''s web-based interface users.
> If I answered your question, please mark it as an answer. It''s useful to
> know that my answer was helpful
> HTH, good luck
> Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
>
> "JOM" wrote:
>
> > I have a field that a employee enters an item. and another field that the
> > employee enters the user of that item....
> > What I would to see is when a user enter enters an item, a popup will appear
> > and inform the user that there are several users of that item and list the
> > users e.g., if the employee enters printer xyz the following will appear!
> >
> > printer xyz has 4 users
> > user1's name
> > user2's name
> > user3's name
> > user4's name | 
08-Nov-2005, 12:52 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! Did you change the names
TableName = The table name where the data is stored
Item = the name of the Item Field
It also seem that I forgot a & before the Me.Item
Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" &
Me.Item & "'")
--
The next line is only relevant to Microsoft''s web-based interface users. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck
"JOM" wrote:
> I have tried it but am having an error in the following line
> Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> Me.Item & "'")
>
> its saying that I need a list separator or )
>
>
>
>
>
> "Ofer" wrote:
>
> > Try this code
> >
> > Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
> > Set MyDb = currentdb
> > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > Me.Item & "'")
> > If not MyRec.Eof then
> > Myrec.MoveLast
> > MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
> > MyRec.movefirst
> > While Not MyRec.Eof
> > MyStr = MyStr & vbCrLf
> > MyStr = MyStr & MyRec.[User_Name]
> > MyRec.MoveNext
> > Wend
> > End If
> >
> > I didn't try the code, so you might get an erorr, also change the fields and Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> > table name according to your data
> > This code need to be on the after update event of the Item field
> >
> > --
> > The next line is only relevant to Microsoft''s web-based interface users.
> > If I answered your question, please mark it as an answer. It''s useful to
> > know that my answer was helpful
> > HTH, good luck
> >
> >
> > "JOM" wrote:
> >
> > > I have a field that a employee enters an item. and another field that the
> > > employee enters the user of that item....
> > > What I would to see is when a user enter enters an item, a popup will appear
> > > and inform the user that there are several users of that item and list the
> > > users e.g., if the employee enters printer xyz the following will appear!
> > >
> > > printer xyz has 4 users
> > > user1's name
> > > user2's name
> > > user3's name
> > > user4's name | 
08-Nov-2005, 12:53 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! Ok that did the trick, but another error came up,
method or data member not found on the following line
MyStr = MyStr & MyRec.[User_Name]
"Ofer" wrote:
> Did you change the names
> TableName = The table name where the data is stored
> Item = the name of the Item Field
>
> It also seem that I forgot a & before the Me.Item
>
> Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" &
> Me.Item & "'")
>
> --
> The next line is only relevant to Microsoft''s web-based interface users.
> If I answered your question, please mark it as an answer. It''s useful to
> know that my answer was helpful
> HTH, good luck
>
>
> "JOM" wrote:
>
> > I have tried it but am having an error in the following line
> > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > Me.Item & "'")
> >
> > its saying that I need a list separator or )
> >
> >
> >
> >
> >
> > "Ofer" wrote: Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> >
> > > Try this code
> > >
> > > Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
> > > Set MyDb = currentdb
> > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > > Me.Item & "'")
> > > If not MyRec.Eof then
> > > Myrec.MoveLast
> > > MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
> > > MyRec.movefirst
> > > While Not MyRec.Eof
> > > MyStr = MyStr & vbCrLf
> > > MyStr = MyStr & MyRec.[User_Name]
> > > MyRec.MoveNext
> > > Wend
> > > End If
> > >
> > > I didn't try the code, so you might get an erorr, also change the fields and
> > > table name according to your data
> > > This code need to be on the after update event of the Item field
> > >
> > > --
> > > The next line is only relevant to Microsoft''s web-based interface users.
> > > If I answered your question, please mark it as an answer. It''s useful to
> > > know that my answer was helpful
> > > HTH, good luck
> > >
> > >
> > > "JOM" wrote:
> > >
> > > > I have a field that a employee enters an item. and another field that the
> > > > employee enters the user of that item....
> > > > What I would to see is when a user enter enters an item, a popup will appear
> > > > and inform the user that there are several users of that item and list the
> > > > users e.g., if the employee enters printer xyz the following will appear!
> > > >
> > > > printer xyz has 4 users
> > > > user1's name Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> > > > user2's name
> > > > user3's name
> > > > user4's name | 
08-Nov-2005, 12:53 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! Sorry, my mistake
change it to
MyRec![User_Name]
instead of a dot
--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck
"JOM" wrote:
> Ok that did the trick, but another error came up, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> method or data member not found on the following line
>
> MyStr = MyStr & MyRec.[User_Name]
>
>
>
> "Ofer" wrote:
>
> > Did you change the names
> > TableName = The table name where the data is stored
> > Item = the name of the Item Field
> >
> > It also seem that I forgot a & before the Me.Item
> >
> > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" &
> > Me.Item & "'")
> >
> > --
> > The next line is only relevant to Microsoft''s web-based interface users.
> > If I answered your question, please mark it as an answer. It''s useful to
> > know that my answer was helpful
> > HTH, good luck
> >
> >
> > "JOM" wrote:
> >
> > > I have tried it but am having an error in the following line
> > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > > Me.Item & "'")
> > >
> > > its saying that I need a list separator or )
> > >
> > >
> > >
> > >
> > >
> > > "Ofer" wrote:
> > >
> > > > Try this code
> > > >
> > > > Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
> > > > Set MyDb = currentdb
> > > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > > > Me.Item & "'")
> > > > If not MyRec.Eof then
> > > > Myrec.MoveLast
> > > > MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
> > > > MyRec.movefirst
> > > > While Not MyRec.Eof
> > > > MyStr = MyStr & vbCrLf Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> > > > MyStr = MyStr & MyRec.[User_Name]
> > > > MyRec.MoveNext
> > > > Wend
> > > > End If
> > > >
> > > > I didn't try the code, so you might get an erorr, also change the fields and
> > > > table name according to your data
> > > > This code need to be on the after update event of the Item field
> > > >
> > > > --
> > > > The next line is only relevant to Microsoft''s web-based interface users.
> > > > If I answered your question, please mark it as an answer. It''s useful to
> > > > know that my answer was helpful
> > > > HTH, good luck
> > > >
> > > >
> > > > "JOM" wrote:
> > > >
> > > > > I have a field that a employee enters an item. and another field that the
> > > > > employee enters the user of that item....
> > > > > What I would to see is when a user enter enters an item, a popup will appear
> > > > > and inform the user that there are several users of that item and list the
> > > > > users e.g., if the employee enters printer xyz the following will appear!
> > > > >
> > > > > printer xyz has 4 users
> > > > > user1's name
> > > > > user2's name
> > > > > user3's name
> > > > > user4's name | 
08-Nov-2005, 12:53 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! ok, that did the trick but another error came up run time error 3131 Syntax
error in from clause
in the following line!
Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" &
me.Item & "'")
"Ofer" wrote:
> Sorry, my mistake
>
> change it to
> MyRec![User_Name]
>
> instead of a dot
>
> --
> The next line is only relevant to Microsoft''s web-based interface users.
> If I answered your question, please mark it as an answer. It''s useful to
> know that my answer was helpful
> HTH, good luck
>
>
> "JOM" wrote:
>
> > Ok that did the trick, but another error came up,
> > method or data member not found on the following line
> >
> > MyStr = MyStr & MyRec.[User_Name]
> >
> >
> >
> > "Ofer" wrote:
> >
> > > Did you change the names
> > > TableName = The table name where the data is stored
> > > Item = the name of the Item Field
> > >
> > > It also seem that I forgot a & before the Me.Item
> > >
> > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" &
> > > Me.Item & "'")
> > >
> > > --
> > > The next line is only relevant to Microsoft''s web-based interface users.
> > > If I answered your question, please mark it as an answer. It''s useful to
> > > know that my answer was helpful
> > > HTH, good luck
> > >
> > >
> > > "JOM" wrote:
> > >
> > > > I have tried it but am having an error in the following line
> > > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > > > Me.Item & "'")
> > > >
> > > > its saying that I need a list separator or )
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Ofer" wrote:
> > > >
> > > > > Try this code
> > > > >
> > > > > Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
> > > > > Set MyDb = currentdb
> > > > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > > > > Me.Item & "'")
> > > > > If not MyRec.Eof then
> > > > > Myrec.MoveLast
> > > > > MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
> > > > > MyRec.movefirst
> > > > > While Not MyRec.Eof
> > > > > MyStr = MyStr & vbCrLf Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> > > > > MyStr = MyStr & MyRec.[User_Name]
> > > > > MyRec.MoveNext
> > > > > Wend
> > > > > End If
> > > > >
> > > > > I didn't try the code, so you might get an erorr, also change the fields and Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> > > > > table name according to your data
> > > > > This code need to be on the after update event of the Item field
> > > > >
> > > > > --
> > > > > The next line is only relevant to Microsoft''s web-based interface users.
> > > > > If I answered your question, please mark it as an answer. It''s useful to
> > > > > know that my answer was helpful
> > > > > HTH, good luck
> > > > >
> > > > >
> > > > > "JOM" wrote:
> > > > >
> > > > > > I have a field that a employee enters an item. and another field that the
> > > > > > employee enters the user of that item....
> > > > > > What I would to see is when a user enter enters an item, a popup will appear
> > > > > > and inform the user that there are several users of that item and list the
> > > > > > users e.g., if the employee enters printer xyz the following will appear!
> > > > > >
> > > > > > printer xyz has 4 users
> > > > > > user1's name
> > > > > > user2's name
> > > > > > user3's name
> > > > > > user4's name | 
08-Nov-2005, 12:53 PM
|  | Guest | | | | | | | | | | RE: informative Messagebox! Can you post the full code that you are using, and not the one I posted?
--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck
"JOM" wrote:
> ok, that did the trick but another error came up run time error 3131 Syntax
> error in from clause
> in the following line!
> Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" &
> me.Item & "'")
>
> "Ofer" wrote:
>
> > Sorry, my mistake
> >
> > change it to
> > MyRec![User_Name]
> >
> > instead of a dot
> >
> > --
> > The next line is only relevant to Microsoft''s web-based interface users.
> > If I answered your question, please mark it as an answer. It''s useful to
> > know that my answer was helpful
> > HTH, good luck
> >
> >
> > "JOM" wrote:
> >
> > > Ok that did the trick, but another error came up,
> > > method or data member not found on the following line
> > >
> > > MyStr = MyStr & MyRec.[User_Name]
> > >
> > >
> > >
> > > "Ofer" wrote:
> > >
> > > > Did you change the names
> > > > TableName = The table name where the data is stored
> > > > Item = the name of the Item Field
> > > >
> > > > It also seem that I forgot a & before the Me.Item
> > > >
> > > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" &
> > > > Me.Item & "'")
> > > >
> > > > --
> > > > The next line is only relevant to Microsoft''s web-based interface users.
> > > > If I answered your question, please mark it as an answer. It''s useful to
> > > > know that my answer was helpful
> > > > HTH, good luck
> > > >
> > > >
> > > > "JOM" wrote:
> > > >
> > > > > I have tried it but am having an error in the following line
> > > > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '" Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> > > > > Me.Item & "'")
> > > > >
> > > > > its saying that I need a list separator or ) Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6852
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Ofer" wrote:
> > > > >
> > > > > > Try this code
> > > > > >
> > > > > > Dim MyDb as Dao.Database, MyRec as Dao.Recordset, MyStr as String
> > > > > > Set MyDb = currentdb
> > > > > > Set MyRec = MyDb.OpenRecordset("Select * From TableName Where Item = '"
> > > > > > Me.Item & "'")
> > > > > > If not MyRec.Eof then
> > > > > > Myrec.MoveLast
> > > > > > MyStr = Me.Item & " Has " & MyRec.RecordCount & " Users"
> > > > > > MyRec.movefirst
> > > > > > While Not MyRec.Eof
> > > > > > MyStr = MyStr & vbCrLf
> > > > > > MyStr = MyStr & MyRec.[User_Name]
> > > > > > MyRec.MoveNext
> > > > > > Wend
> > > > > > End If
> > > > > >
> > > > > > I didn't try the code, so you might get an erorr, also change the fields and
> > > > > > table name according to your data
> > > > > > This code need to be on the after update event of the Item field
> > > > > >
> > > > > > --
> > > > > > The next line is only relevant to Microsoft''s web-based interface users.
> > > > > > If I answered your question, please mark it as an answer. It''s useful to
> > > > > > know that my answer was helpful
> > > > > > HTH, good luck
> > > > > >
> > > > > >
> > > > > > "JOM" wrote:
> > > > > >
> > > > > > > I have a field that a employee enters an item. and another field that the
> > > > > > > employee enters the user of that item....
> > > > > > > What I would to see is when a user enter enters an item, a popup will appear
> > > > > > > and inform the user that there are several users of that item and list the
> > > > > > > users e.g., if the employee enters printer xyz the following will appear!
> > > > > > >
> > > > > > > printer xyz has 4 users
> > > > > > > user1's name
> > > > > > > user2's name
> > > > > > > user3's name
> > > > > > > user4's name | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Active Discussions | | | | | | | ਨਾਮਾ Today 06:37 AM 2 Replies, 53 Views | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |