Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Change Data Source For Access XP Form


  • Please log in to reply

#1
magusbuckley

magusbuckley

    Member

  • Member
  • PipPipPip
  • 625 posts
Hello:

At work, we have an access database that keeps track of our computer inventory. I created a form for easy entry of the computers, their hardware, and their installed software. We have more than 200 comuters in the table. I copied the "Entry Form", pasted it, and renamed the copy as "Edit Form". When we open this form, I'd like for it to prompt the user for the computer name. After entering the name, the computer and all of it's information will pull up in the form for editing (example: We installed more RAM into a computer and need to reflect this change in our inventory. I would pull up that computer name and change the amount of RAM to the new amount). I created a query with the prompt.

Here is the problem:

The original form "Entry Form" is linked to the "Entry Table". Since the new form "Edit Form", is a copy of "Entry Form", it too is linked to the "Entry Table". How can I change the link of "Edit Form" from "Entry Table" to the query I built?

What I've tried:

I opened "Edit Form" in design view, selected the "Computer Name" field, and selected the "ALL" tab. Under data source, I changed "Computer Name" to "=[Computer Query]![Computer Name]". When I open the form now, I still don't get the prompt. In addion, the computer name field displays "#Name?" instead of the actual computer name.

Is there a way to change the datasource from the table to the query? If not, I'll have to create a new form in design view and have it link to the query during the initial setup. I know this will work because I've done it. The problem there is that the form has MANY fields and I'm trying to prevent myself from having to recreate the layout of the original form.

Any and all information will be greatly appreciated.

Thanks,

Magus
  • 0

Advertisements


#2
piper

piper

    Retired Staff

  • Retired Staff
  • 2,459 posts
To change the data source, open the form in design view. Then open Properties for the form. There's a Properties icon on the toolbar, or you can click View menu, Properities.

When it opens, be sure that "FORM" is chosen in the drop-down box at the top of the screen. Then go to the Data tab or the All tab. The first field is Record Source. Open the drop-down and choose the new record source.

Once you've changed the Form's data source, all the fields will be automatically updated. The only problem you might encounter is if you've left a field out of the query.

This should solve your problem.

Please post the results, good or bad.
  • 0

#3
magusbuckley

magusbuckley

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 625 posts
LindaGail:

You solved my problem. I knew there had to be an easy fix, I was just looking all over it. I was trying to change the data source on the field that was used for the prompt in the query instead of changing the datasource for the entire form.

Made the changes and everything works like I need it to.

Thanks a gazillion for the help.

:whistling:

Magus

Edited by magusbuckley, 07 January 2007 - 01:39 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP