Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Database question

New Here ,
May 08, 2006 May 08, 2006

Copy link to clipboard

Copied

I've created an "insert record" using the wizard. How would I display this information from the database on another page, once a user enters information into the first page? I keep getting information on the second page from the first record. I need the second page to show the latest record, ie what was inserted into the first page. I'm sure its very simple, but I've spent hours reading books and its not a common tast to perform. A master detail page won't acheive this as it only displays information from "already created" records. Hope that make sense? Thanks very much
TOPICS
Server side applications

Views

506
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

If I understand you correctly, I think you need the SQL in your recordset for the second display page to include the orderoing of your unique recordID

ORDER BY DESC

This will allow you to order your recordID in descending order (last first). You will then just diplay one record on the page (the last one entered).

Hope this is what you are after.

Jules

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

hmmmm, that makes sense. Do you mean displaying all the ID's for the records on the second page and setting it so that only the last ID is displayed? How would you make only the last record display this? Because they are all records and not separate fields so the applying of "ascending" wouldn't work? Thanks Jules

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

You would need to remove any Repeat Region behaviour on your second page. Your page will only then pull the first record to display and because your SQL is ORDER BY DESC it will display the last record only.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

Thanks very much for your help, I tried ordering the ID as descending, but received the error message: error in syntax, (missing operater) in query expression. I'm assuming this error has something to do with the fact that it is a unique key, all the other fields work fine, except this one.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

Hmm ... a number of things can cause it. What have you called your unique ID column?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

when you say "unique ID column" do you mean the unique ID field's name? I've called it Cost ID, its what I've called it in the database and hence shows up when I create a recordset.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

OK make the name CostID with no space. The space is the syntax error I think.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

Brilliant Jules! That was my problem! Its working great now, thanks very much!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 09, 2006 May 09, 2006

Copy link to clipboard

Copied

LATEST
You are most welcome.

Jules

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines