473,418 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

how to retrieve records submmited on a form

kev
Hi all,

I have created a database for equipments. I have a form to register the
equipment meaning filling in all the particulars (ID, serial, type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem here
is i need to retrieve back the information submitted to display all the
data that the user has input in something like

*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia

Please help as i need to do it urgently and am running out of time.

Thanks a lot!!

Dec 7 '06 #1
13 3388
Kev, you have not told us why you are doing this the hard way.

Just create a form bound to your table. There is no need for any code,
button, or tying to retrieve the data. You can use the built-in navigation
buttons at the bottom of the form to move to a new record, enter it, and it
saves and displays without any code.

--
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.

"kev" <ke******@gmail.comwrote in message
news:11*********************@j72g2000cwa.googlegro ups.com...
>
I have created a database for equipments. I have a form to register the
equipment meaning filling in all the particulars (ID, serial, type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem here
is i need to retrieve back the information submitted to display all the
data that the user has input in something like

*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia

Please help as i need to do it urgently and am running out of time.

Thanks a lot!!

Dec 7 '06 #2
kev
Hi Allen,

Thank you for a quick reply but i am still not getting the solution for
my problem.
Let me explain again.
Once the user have filled in up the equipment registration form then
click submit, i want the data inputted shown in the next page/form.
I want only the current record to be displayed and not all records...
i have disabled the built-in navigation buttons as i only want one
record to be displayed at one time.(i do not want the user to view
other records)

I did use the method you suggested below but it is not displaying the
correct record instead it shows any record at random from the database.

Pls reply asap as my project relies very much on this..

Thanks again and sorry for any inconveniences caused

Allen Browne wrote:
Kev, you have not told us why you are doing this the hard way.

Just create a form bound to your table. There is no need for any code,
button, or tying to retrieve the data. You can use the built-in navigation
buttons at the bottom of the form to move to a new record, enter it, and it
saves and displays without any code.

--
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.

"kev" <ke******@gmail.comwrote in message
news:11*********************@j72g2000cwa.googlegro ups.com...

I have created a database for equipments. I have a form to register the
equipment meaning filling in all the particulars (ID, serial, type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem here
is i need to retrieve back the information submitted to display all the
data that the user has input in something like

*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia

Please help as i need to do it urgently and am running out of time.

Thanks a lot!!
Dec 7 '06 #3
Kev, bear in mind that we don't know:
- how many tables are involved,
- what primary keys and foreign keys are involved,
- how you submit the data,
- how you retrieve the data and populate the controls on your unbound form.

It is therefore impossible to advise you on what process you need.

The example below illustrates how to use an Append query statement to write
a record to a table, and then retrieve the AutoNumber value. Hopefully you
know how to OpenRecordset on that particular record from there, and you can
also apply the same approach to the related tables where the answers to the
individual questions in your survery are presumably stored. Note that this
requires at least Access 2000.

Function ShowIdentity() As Variant
Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = DBEngine(0)(0)
db.Execute "INSERT INTO MyTable ( MyField ) SELECT 'nuffin' AS Expr1;"

Set rs = db.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity = rs!LastID
rs.Close

Set rs = Nothing
Set db = Nothing
End Function

--
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.

"kev" <ke******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Hi Allen,

Thank you for a quick reply but i am still not getting the solution for
my problem.
Let me explain again.
Once the user have filled in up the equipment registration form then
click submit, i want the data inputted shown in the next page/form.
I want only the current record to be displayed and not all records...
i have disabled the built-in navigation buttons as i only want one
record to be displayed at one time.(i do not want the user to view
other records)

I did use the method you suggested below but it is not displaying the
correct record instead it shows any record at random from the database.

Pls reply asap as my project relies very much on this..

Thanks again and sorry for any inconveniences caused

Allen Browne wrote:
>Kev, you have not told us why you are doing this the hard way.

Just create a form bound to your table. There is no need for any code,
button, or tying to retrieve the data. You can use the built-in
navigation
buttons at the bottom of the form to move to a new record, enter it, and
it
saves and displays without any code.

"kev" <ke******@gmail.comwrote in message
news:11*********************@j72g2000cwa.googlegr oups.com...
>
I have created a database for equipments. I have a form to register the
equipment meaning filling in all the particulars (ID, serial, type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem here
is i need to retrieve back the information submitted to display all the
data that the user has input in something like

*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia

Please help as i need to do it urgently and am running out of time.

Thanks a lot!!

Dec 7 '06 #4
kev
Hi Allen,

I really hope you can teach me about recordsets-how to create it and
OpenRecordset.
Please help as i am a fresh beginner starting from zero knowledge about
this.

And also, i came across the article "How to retrieve a querydef from Ms
Access using DAO".
Will this method solve my existing problem?

Thanks a million!

Allen Browne wrote:
Kev, bear in mind that we don't know:
- how many tables are involved,
- what primary keys and foreign keys are involved,
- how you submit the data,
- how you retrieve the data and populate the controls on your unbound form.

It is therefore impossible to advise you on what process you need.

The example below illustrates how to use an Append query statement to write
a record to a table, and then retrieve the AutoNumber value. Hopefully you
know how to OpenRecordset on that particular record from there, and you can
also apply the same approach to the related tables where the answers to the
individual questions in your survery are presumably stored. Note that this
requires at least Access 2000.

Function ShowIdentity() As Variant
Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = DBEngine(0)(0)
db.Execute "INSERT INTO MyTable ( MyField ) SELECT 'nuffin' AS Expr1;"

Set rs = db.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity = rs!LastID
rs.Close

Set rs = Nothing
Set db = Nothing
End Function

--
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.

"kev" <ke******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Hi Allen,

Thank you for a quick reply but i am still not getting the solution for
my problem.
Let me explain again.
Once the user have filled in up the equipment registration form then
click submit, i want the data inputted shown in the next page/form.
I want only the current record to be displayed and not all records...
i have disabled the built-in navigation buttons as i only want one
record to be displayed at one time.(i do not want the user to view
other records)

I did use the method you suggested below but it is not displaying the
correct record instead it shows any record at random from the database.

Pls reply asap as my project relies very much on this..

Thanks again and sorry for any inconveniences caused

Allen Browne wrote:
Kev, you have not told us why you are doing this the hard way.

Just create a form bound to your table. There is no need for any code,
button, or tying to retrieve the data. You can use the built-in
navigation
buttons at the bottom of the form to move to a new record, enter it, and
it
saves and displays without any code.

"kev" <ke******@gmail.comwrote in message
news:11*********************@j72g2000cwa.googlegro ups.com...

I have created a database for equipments. I have a form to register the
equipment meaning filling in all the particulars (ID, serial, type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem here
is i need to retrieve back the information submitted to display all the
data that the user has input in something like

*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia

Please help as i need to do it urgently and am running out of time.

Thanks a lot!!
Dec 7 '06 #5
kev
Sorry ..forget to include this code in:
Sub GetQueryDef()
'This sub will get data from an Existing QueryDef in the
Northwind
'database and place the data on sheet2.

Dim Db As Database
Dim Qd As QueryDef
Dim Rs As Recordset
Dim Ws As Object
Dim i As Integer
Dim Path as String

'Set the Path to the database. This line is useful because
'if your database is in another location, you just need to change
'it here and the Path Variable will be used throughout the code.
'
'If you're using Microsoft Office 97, the line should read:
'
'Path = "C:\Program Files\Microsoft
'Office\Office\Samples\Northwind.mdb"
'
Path = "C:\Msoffice\Access\Samples\Northwind.mdb"

'Set Ws
Set Ws = Sheets("Sheet1")

'This set of code will activate Sheet1 and clear any existing
data.
'After clearing the data, it will select cell A1.
Ws.Activate
Range("A1").Activate
Selection.CurrentRegion.Select
Selection.ClearContents
Range("A1").Select

'Set the Database and QueryDef. This QueryDef exists in the
'database.
Set Db = Workspaces(0).OpenDatabase(Path, ReadOnly:=True, _
Exclusive:=False)
Set Qd = Db.QueryDefs("Invoices")

'Create a new Recordset from the Query based on the stored
'QueryDef.
Set Rs = Qd.OpenRecordset()

'This loop will collect the field names and place them in the
first
'row starting at "A1."
For i = 0 To Rs.Fields.Count - 1
Ws.Cells(1, i + 1).Value = Rs.Fields(i).Name
Next

'This line simply sets the font to bold for the headers.
Ws.Range(Ws.Cells(1, 1), Ws.Cells(1, Rs.Fields.Count)).Font.Bold
_
=True

'The next line will get the data from the recordset and copy it
'into the Worksheet (Sheet1).

Ws.Range("A2").CopyFromRecordset Rs

'This next code set will just select the data region and auto-fit
'the columns
Sheets("Sheet1").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Columns.AutoFit
Range("A1").Select

Qd.Close
Rs.Close
Db.Close

End Sub

Where do i attach this code to? at which field? which event?
kev wrote:
Hi Allen,

I really hope you can teach me about recordsets-how to create it and
OpenRecordset.
Please help as i am a fresh beginner starting from zero knowledge about
this.

And also, i came across the article "How to retrieve a querydef from Ms
Access using DAO".
Will this method solve my existing problem?

Thanks a million!

Allen Browne wrote:
Kev, bear in mind that we don't know:
- how many tables are involved,
- what primary keys and foreign keys are involved,
- how you submit the data,
- how you retrieve the data and populate the controls on your unbound form.

It is therefore impossible to advise you on what process you need.

The example below illustrates how to use an Append query statement to write
a record to a table, and then retrieve the AutoNumber value. Hopefully you
know how to OpenRecordset on that particular record from there, and you can
also apply the same approach to the related tables where the answers to the
individual questions in your survery are presumably stored. Note that this
requires at least Access 2000.

Function ShowIdentity() As Variant
Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = DBEngine(0)(0)
db.Execute "INSERT INTO MyTable ( MyField ) SELECT 'nuffin' AS Expr1;"

Set rs = db.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity = rs!LastID
rs.Close

Set rs = Nothing
Set db = Nothing
End Function

--
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.

"kev" <ke******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Hi Allen,
>
Thank you for a quick reply but i am still not getting the solution for
my problem.
Let me explain again.
Once the user have filled in up the equipment registration form then
click submit, i want the data inputted shown in the next page/form.
I want only the current record to be displayed and not all records...
i have disabled the built-in navigation buttons as i only want one
record to be displayed at one time.(i do not want the user to view
other records)
>
I did use the method you suggested below but it is not displaying the
correct record instead it shows any record at random from the database.
>
Pls reply asap as my project relies very much on this..
>
Thanks again and sorry for any inconveniences caused
>
Allen Browne wrote:
>Kev, you have not told us why you are doing this the hard way.
>>
>Just create a form bound to your table. There is no need for any code,
>button, or tying to retrieve the data. You can use the built-in
>navigation
>buttons at the bottom of the form to move to a new record, enter it, and
>it
>saves and displays without any code.
>>
>"kev" <ke******@gmail.comwrote in message
>news:11*********************@j72g2000cwa.googlegr oups.com...
>
I have created a database for equipments. I have a form to register the
equipment meaning filling in all the particulars (ID, serial, type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem here
is i need to retrieve back the information submitted to display all the
data that the user has input in something like
>
*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia
>
Please help as i need to do it urgently and am running out of time.
>
Thanks a lot!!
Dec 7 '06 #6
Learning to handle recordsets is a bigger topic than we can achieve in a
newsgroup posting.

The function you postded seems to be connecting to spreadsheets, so is not
typical of recordsets in Access.

Recordsets use DAO or ADO. DAO is the native library in Access.

Again, and particularly if recordsets are new to you, I would encourage you
to review why you are wanting to program all this. It would be much better
to learn how to use the interface Access provides. Bound forms can do the
whole job for you. You can adapt them to what you need to achieve.

That's probably as far as I can take you on this one.

--
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.

"kev" <ke******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Sorry ..forget to include this code in:
Sub GetQueryDef()
'This sub will get data from an Existing QueryDef in the
Northwind
'database and place the data on sheet2.

Dim Db As Database
Dim Qd As QueryDef
Dim Rs As Recordset
Dim Ws As Object
Dim i As Integer
Dim Path as String

'Set the Path to the database. This line is useful because
'if your database is in another location, you just need to change
'it here and the Path Variable will be used throughout the code.
'
'If you're using Microsoft Office 97, the line should read:
'
'Path = "C:\Program Files\Microsoft
'Office\Office\Samples\Northwind.mdb"
'
Path = "C:\Msoffice\Access\Samples\Northwind.mdb"

'Set Ws
Set Ws = Sheets("Sheet1")

'This set of code will activate Sheet1 and clear any existing
data.
'After clearing the data, it will select cell A1.
Ws.Activate
Range("A1").Activate
Selection.CurrentRegion.Select
Selection.ClearContents
Range("A1").Select

'Set the Database and QueryDef. This QueryDef exists in the
'database.
Set Db = Workspaces(0).OpenDatabase(Path, ReadOnly:=True, _
Exclusive:=False)
Set Qd = Db.QueryDefs("Invoices")

'Create a new Recordset from the Query based on the stored
'QueryDef.
Set Rs = Qd.OpenRecordset()

'This loop will collect the field names and place them in the
first
'row starting at "A1."
For i = 0 To Rs.Fields.Count - 1
Ws.Cells(1, i + 1).Value = Rs.Fields(i).Name
Next

'This line simply sets the font to bold for the headers.
Ws.Range(Ws.Cells(1, 1), Ws.Cells(1, Rs.Fields.Count)).Font.Bold
_
=True

'The next line will get the data from the recordset and copy it
'into the Worksheet (Sheet1).

Ws.Range("A2").CopyFromRecordset Rs

'This next code set will just select the data region and auto-fit
'the columns
Sheets("Sheet1").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Columns.AutoFit
Range("A1").Select

Qd.Close
Rs.Close
Db.Close

End Sub

Where do i attach this code to? at which field? which event?
kev wrote:
>Hi Allen,

I really hope you can teach me about recordsets-how to create it and
OpenRecordset.
Please help as i am a fresh beginner starting from zero knowledge about
this.

And also, i came across the article "How to retrieve a querydef from Ms
Access using DAO".
Will this method solve my existing problem?

Thanks a million!

Allen Browne wrote:
Kev, bear in mind that we don't know:
- how many tables are involved,
- what primary keys and foreign keys are involved,
- how you submit the data,
- how you retrieve the data and populate the controls on your unbound
form.

It is therefore impossible to advise you on what process you need.

The example below illustrates how to use an Append query statement to
write
a record to a table, and then retrieve the AutoNumber value. Hopefully
you
know how to OpenRecordset on that particular record from there, and you
can
also apply the same approach to the related tables where the answers to
the
individual questions in your survery are presumably stored. Note that
this
requires at least Access 2000.

Function ShowIdentity() As Variant
Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = DBEngine(0)(0)
db.Execute "INSERT INTO MyTable ( MyField ) SELECT 'nuffin' AS
Expr1;"

Set rs = db.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity = rs!LastID
rs.Close

Set rs = Nothing
Set db = Nothing
End Function

--
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.

"kev" <ke******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Hi Allen,

Thank you for a quick reply but i am still not getting the solution
for
my problem.
Let me explain again.
Once the user have filled in up the equipment registration form then
click submit, i want the data inputted shown in the next page/form.
I want only the current record to be displayed and not all records...
i have disabled the built-in navigation buttons as i only want one
record to be displayed at one time.(i do not want the user to view
other records)

I did use the method you suggested below but it is not displaying the
correct record instead it shows any record at random from the
database.

Pls reply asap as my project relies very much on this..

Thanks again and sorry for any inconveniences caused

Allen Browne wrote:
Kev, you have not told us why you are doing this the hard way.

Just create a form bound to your table. There is no need for any
code,
button, or tying to retrieve the data. You can use the built-in
navigation
buttons at the bottom of the form to move to a new record, enter it,
and
it
saves and displays without any code.

"kev" <ke******@gmail.comwrote in message
news:11*********************@j72g2000cwa.googlegr oups.com...

I have created a database for equipments. I have a form to
register the
equipment meaning filling in all the particulars (ID, serial,
type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem
here
is i need to retrieve back the information submitted to display
all the
data that the user has input in something like

*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia

Please help as i need to do it urgently and am running out of
time.

Thanks a lot!!

Dec 7 '06 #7
kev
Hi Allen,

Can you elaborate more on the bound form.
I did create a bound form for registration and when the user clicks
submit, it saves into the corresponding Equipment table. After
submitting this record, user moves on to another page whereby i want to
display the summary (perhaps just two or three fields) and then user
proceeds to second level of registration..

Extremely sorry for bothering but i have no idea what to do next adn i
have been stuck on this for more than a week.

Thanks a zillion!

Allen Browne wrote:
Learning to handle recordsets is a bigger topic than we can achieve in a
newsgroup posting.

The function you postded seems to be connecting to spreadsheets, so is not
typical of recordsets in Access.

Recordsets use DAO or ADO. DAO is the native library in Access.

Again, and particularly if recordsets are new to you, I would encourage you
to review why you are wanting to program all this. It would be much better
to learn how to use the interface Access provides. Bound forms can do the
whole job for you. You can adapt them to what you need to achieve.

That's probably as far as I can take you on this one.

--
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.

"kev" <ke******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Sorry ..forget to include this code in:
Sub GetQueryDef()
'This sub will get data from an Existing QueryDef in the
Northwind
'database and place the data on sheet2.

Dim Db As Database
Dim Qd As QueryDef
Dim Rs As Recordset
Dim Ws As Object
Dim i As Integer
Dim Path as String

'Set the Path to the database. This line is useful because
'if your database is in another location, you just need to change
'it here and the Path Variable will be used throughout the code.
'
'If you're using Microsoft Office 97, the line should read:
'
'Path = "C:\Program Files\Microsoft
'Office\Office\Samples\Northwind.mdb"
'
Path = "C:\Msoffice\Access\Samples\Northwind.mdb"

'Set Ws
Set Ws = Sheets("Sheet1")

'This set of code will activate Sheet1 and clear any existing
data.
'After clearing the data, it will select cell A1.
Ws.Activate
Range("A1").Activate
Selection.CurrentRegion.Select
Selection.ClearContents
Range("A1").Select

'Set the Database and QueryDef. This QueryDef exists in the
'database.
Set Db = Workspaces(0).OpenDatabase(Path, ReadOnly:=True, _
Exclusive:=False)
Set Qd = Db.QueryDefs("Invoices")

'Create a new Recordset from the Query based on the stored
'QueryDef.
Set Rs = Qd.OpenRecordset()

'This loop will collect the field names and place them in the
first
'row starting at "A1."
For i = 0 To Rs.Fields.Count - 1
Ws.Cells(1, i + 1).Value = Rs.Fields(i).Name
Next

'This line simply sets the font to bold for the headers.
Ws.Range(Ws.Cells(1, 1), Ws.Cells(1, Rs.Fields.Count)).Font.Bold
_
=True

'The next line will get the data from the recordset and copy it
'into the Worksheet (Sheet1).

Ws.Range("A2").CopyFromRecordset Rs

'This next code set will just select the data region and auto-fit
'the columns
Sheets("Sheet1").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Columns.AutoFit
Range("A1").Select

Qd.Close
Rs.Close
Db.Close

End Sub

Where do i attach this code to? at which field? which event?
kev wrote:
Hi Allen,

I really hope you can teach me about recordsets-how to create it and
OpenRecordset.
Please help as i am a fresh beginner starting from zero knowledge about
this.

And also, i came across the article "How to retrieve a querydef from Ms
Access using DAO".
Will this method solve my existing problem?

Thanks a million!

Allen Browne wrote:
Kev, bear in mind that we don't know:
- how many tables are involved,
- what primary keys and foreign keys are involved,
- how you submit the data,
- how you retrieve the data and populate the controls on your unbound
form.

It is therefore impossible to advise you on what process you need.

The example below illustrates how to use an Append query statement to
write
a record to a table, and then retrieve the AutoNumber value. Hopefully
you
know how to OpenRecordset on that particular record from there, and you
can
also apply the same approach to the related tables where the answers to
the
individual questions in your survery are presumably stored. Note that
this
requires at least Access 2000.

Function ShowIdentity() As Variant
Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = DBEngine(0)(0)
db.Execute "INSERT INTO MyTable ( MyField ) SELECT 'nuffin' AS
Expr1;"

Set rs = db.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity = rs!LastID
rs.Close

Set rs = Nothing
Set db = Nothing
End Function

--
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.

"kev" <ke******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
Hi Allen,
>
Thank you for a quick reply but i am still not getting the solution
for
my problem.
Let me explain again.
Once the user have filled in up the equipment registration form then
click submit, i want the data inputted shown in the next page/form.
I want only the current record to be displayed and not all records...
i have disabled the built-in navigation buttons as i only want one
record to be displayed at one time.(i do not want the user to view
other records)
>
I did use the method you suggested below but it is not displaying the
correct record instead it shows any record at random from the
database.
>
Pls reply asap as my project relies very much on this..
>
Thanks again and sorry for any inconveniences caused
>
Allen Browne wrote:
>Kev, you have not told us why you are doing this the hard way.
>>
>Just create a form bound to your table. There is no need for any
>code,
>button, or tying to retrieve the data. You can use the built-in
>navigation
>buttons at the bottom of the form to move to a new record, enter it,
>and
>it
>saves and displays without any code.
>>
>"kev" <ke******@gmail.comwrote in message
>news:11*********************@j72g2000cwa.googlegr oups.com...
>
I have created a database for equipments. I have a form to
register the
equipment meaning filling in all the particulars (ID, serial,
type,
location etc). I have two buttons at the end of the form which is
submit and cancel. After i have clicked submit, the information is
stored directly into my corresponding database table. My problem
here
is i need to retrieve back the information submitted to display
all the
data that the user has input in something like
>
*Thank you for submitting.
Your details submitted is as below
id:00125
name:machine
location:malaysia
>
Please help as i need to do it urgently and am running out of
time.
>
Thanks a lot!!
Dec 7 '06 #8
On 7 Dec 2006 01:46:23 -0800, "kev" <ke******@gmail.comwrote:

Allen is right. You are a rookie. Stay with the basics and use Access
how it was designed to be used.

Move to the Summary page: DoCmd.Openform "frmSummary"
(or whatever your summary form is called). Don't try to do it all in
one form.

-Tom.

>Hi Allen,

Can you elaborate more on the bound form.
I did create a bound form for registration and when the user clicks
submit, it saves into the corresponding Equipment table. After
submitting this record, user moves on to another page whereby i want to
display the summary (perhaps just two or three fields) and then user
proceeds to second level of registration..

Extremely sorry for bothering but i have no idea what to do next adn i
have been stuck on this for more than a week.

Thanks a zillion!
<clip>

Dec 7 '06 #9
i got to see ur mail a few minuite ago send to me ur full email address
to is********@gmail.com or me*********@gmail.com and i will post u the
source code we could also chat on yahoo tomorrow i am Nigerian 11:00 am
Nigerian Time, Hear from U soon. or i will post it here tomorrow i am
exhausted for now cheers and dont run out of time
*** Sent via Developersdex http://www.developersdex.com ***
Dec 7 '06 #10
kev
Hi Nyada,

Hope you could send me the source code asap as my project is currently
on hold for this.
Or you could mail to me at ke******@gmail.com

Thanks in advance for your help.

Nyada Ishaya Okem wrote:
i got to see ur mail a few minuite ago send to me ur full email address
to is********@gmail.com or me*********@gmail.com and i will post u the
source code we could also chat on yahoo tomorrow i am Nigerian 11:00 am
Nigerian Time, Hear from U soon. or i will post it here tomorrow i am
exhausted for now cheers and dont run out of time
*** Sent via Developersdex http://www.developersdex.com ***
Dec 8 '06 #11
kev
Hi Tom,

I think you don't quite get me here.
I have created a frm Summary which will open right after the
registration.
My problem is still the same, my frmSummary must show the summary of
registration but how?
I created frmSummary bound to the Equipment table(record source) but
the summary show records of other users registration as well.

How to make it show oni the current registration record?
Please help to explain in detail if possible provide the source code as
well.

btw, DoCmd.Openform "frmSummary" is attached to the submit button
right?
Lots of thanks.

Tom van Stiphout wrote:
On 7 Dec 2006 01:46:23 -0800, "kev" <ke******@gmail.comwrote:

Allen is right. You are a rookie. Stay with the basics and use Access
how it was designed to be used.

Move to the Summary page: DoCmd.Openform "frmSummary"
(or whatever your summary form is called). Don't try to do it all in
one form.

-Tom.

Hi Allen,

Can you elaborate more on the bound form.
I did create a bound form for registration and when the user clicks
submit, it saves into the corresponding Equipment table. After
submitting this record, user moves on to another page whereby i want to
display the summary (perhaps just two or three fields) and then user
proceeds to second level of registration..

Extremely sorry for bothering but i have no idea what to do next adn i
have been stuck on this for more than a week.

Thanks a zillion!
<clip>
Dec 8 '06 #12
On 7 Dec 2006 17:34:46 -0800, "kev" <ke******@gmail.comwrote:

Check DoCmd.OpenForm in the help file. It has an additional argument
"strWhere". You could supply:
"EquipmentID = " & Forms!frmRegistration!EquipmentID
If EquipmentID is text, put single quotes around it like this:
"EquipmentID = '" & Forms!frmRegistration!EquipmentID & "'"

Sorry, my first paragraph was a bit harsh upon second reading. I
didn't mean to offend you. Rookies are very welcome here.

-Tom.

>Hi Tom,

I think you don't quite get me here.
I have created a frm Summary which will open right after the
registration.
My problem is still the same, my frmSummary must show the summary of
registration but how?
I created frmSummary bound to the Equipment table(record source) but
the summary show records of other users registration as well.

How to make it show oni the current registration record?
Please help to explain in detail if possible provide the source code as
well.

btw, DoCmd.Openform "frmSummary" is attached to the submit button
right?
Lots of thanks.

Tom van Stiphout wrote:
>On 7 Dec 2006 01:46:23 -0800, "kev" <ke******@gmail.comwrote:

Allen is right. You are a rookie. Stay with the basics and use Access
how it was designed to be used.

Move to the Summary page: DoCmd.Openform "frmSummary"
(or whatever your summary form is called). Don't try to do it all in
one form.

-Tom.

>Hi Allen,

Can you elaborate more on the bound form.
I did create a bound form for registration and when the user clicks
submit, it saves into the corresponding Equipment table. After
submitting this record, user moves on to another page whereby i want to
display the summary (perhaps just two or three fields) and then user
proceeds to second level of registration..

Extremely sorry for bothering but i have no idea what to do next adn i
have been stuck on this for more than a week.

Thanks a zillion!
<clip>
Dec 8 '06 #13
kev
Hi Tom,

Thanks a lot on your help. My frmRegistration can display the correct
value on frmSummary.
You are the best man!
Thanks again..

Tom van Stiphout wrote:
On 7 Dec 2006 17:34:46 -0800, "kev" <ke******@gmail.comwrote:

Check DoCmd.OpenForm in the help file. It has an additional argument
"strWhere". You could supply:
"EquipmentID = " & Forms!frmRegistration!EquipmentID
If EquipmentID is text, put single quotes around it like this:
"EquipmentID = '" & Forms!frmRegistration!EquipmentID & "'"

Sorry, my first paragraph was a bit harsh upon second reading. I
didn't mean to offend you. Rookies are very welcome here.

-Tom.

Hi Tom,

I think you don't quite get me here.
I have created a frm Summary which will open right after the
registration.
My problem is still the same, my frmSummary must show the summary of
registration but how?
I created frmSummary bound to the Equipment table(record source) but
the summary show records of other users registration as well.

How to make it show oni the current registration record?
Please help to explain in detail if possible provide the source code as
well.

btw, DoCmd.Openform "frmSummary" is attached to the submit button
right?
Lots of thanks.

Tom van Stiphout wrote:
On 7 Dec 2006 01:46:23 -0800, "kev" <ke******@gmail.comwrote:

Allen is right. You are a rookie. Stay with the basics and use Access
how it was designed to be used.

Move to the Summary page: DoCmd.Openform "frmSummary"
(or whatever your summary form is called). Don't try to do it all in
one form.

-Tom.
Hi Allen,

Can you elaborate more on the bound form.
I did create a bound form for registration and when the user clicks
submit, it saves into the corresponding Equipment table. After
submitting this record, user moves on to another page whereby i want to
display the summary (perhaps just two or three fields) and then user
proceeds to second level of registration..

Extremely sorry for bothering but i have no idea what to do next adn i
have been stuck on this for more than a week.

Thanks a zillion!

<clip>
Dec 8 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Roar | last post by:
Hi! I have got 1 access 2000 DB, one simple search form, and 3 .asp pages (one for deleting a record, one for inserting a record and one for listing searchresults). Deleting records works fine,...
5
by: Rich Protzel | last post by:
Hello, If I run an action SP from MS Access using ADO: ... cmd.execute where the SP is something like Create... Update tbl1 set fld1 = 'something' where... how can I retrive the count of...
1
by: Neil | last post by:
Hello everyone, I am making a program at the moment, and need HELP!!!. I'll start with the database, my field's r: fldSku - which a 6 digit number, no more no less (145682) fldDescription - which...
12
by: jaYPee | last post by:
I have currently using a dataset to access my data from sql server 2000. The dataset contains 3 tables that is related to each other. parent/child/grandchild relationship. My problem is it's very...
0
by: padhuwork | last post by:
Hi, I want to create a Windows DLL using VC++ 6.0 which connects to SQL Server. After establishing the connection, I want to retrieve records from table (query) and out put the recordset to a...
4
by: LetMeDoIt | last post by:
Greetings, I'm using ASP to retrieve from MSSQL and I then populate a table. After several months of successfull retrieves, this same code now bombs out. It turns out that if I clear out from...
14
by: David | last post by:
Hi, I have a form on which a user can select a checkbox against a record. Each checkbox carries the RecordID of a product. ---------------------------------------------------------------- I...
4
by: Evanescent | last post by:
Hi Guys, I am trying to create a form which allows the users to retrieve records based on the values entered or chosen in the various combo boxes and textboxes, such as the customer's name, invoice...
4
by: questionit | last post by:
How do i retreive 10 rows from a table using SQL SELECT Names from Customers... how do i change it to retrieve only 'n' number of rows? Please suggest an easy method Thanks
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.