473,320 Members | 1,939 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,320 software developers and data experts.

Change RecordSource for forms

Hi,

I have a number of tables with the same structure they are all lookup tables. I went this way because I couldn't stop invalid data from being loaded (data is imported via transferspreadsheet). Even though I have set up validation in the spreadsheet, I wanted to make sure that if that gets beaten, that the database validation will stop the invalid data.

Could someone tell me the best way to do this using the single table approach? I do have combo boxes set up for the fields (and other validations), but was able to load invalid data with all of these set.

My alternative approach has been to set up a form with a combo box containing all of the lookup tablenames. I thought that I would just have a after update event which sets the form recordsource to the value in the drop-down list. This kind of worked, but in this form, I have two views of the same table - a single form with a datasheet version below it. (Overkill, but I am only allowing edits appends etc to the single form view - that datasheet view is there for quick view.)
The datasheet only shows a single record (the same as that in the single form). I have checked that there are no filters or parent/child relationships, and tried the me.requery, but can't see what else could be going wrong. Any suggestions?

Thanks,

Jason
Sep 27 '06 #1
4 2067
PEB
1,418 Expert 1GB
Hi,

it is possible to store the imported data from Excel in one table!

In fact if this is a simmilar structure this is better!

But the validation when importing your data depends on the problematic fileds in Excel... You have pb with dates? numbers? or what?

Maybe a small functions that correct the data from Excel can help you!

:)
Sep 30 '06 #2
Hi PEB,

I started with a single table that had all the lookup values in it and referenced them appropriately in the combo boxes in the table design. I found this fine if data is entered into the database or forms, but when I imported data through excel (transferspreadsheet) data went into the tables like I had done nothing.

What I have done since is set up a whole heap of lookup tables that have a one to many relationship with enforce data entegrity checked. This stops invalid data, and doesn't matter where or how you get the data. I thought this would be the messy way of doing things.

Jason
Oct 5 '06 #3
Would having all these lookup tables slow down the opening of forms that have data referencing them? I have some forms that have 5 or 6 sub forms including some crosstab queries so anything that I can do to speed up opening these forms would help (the standard on the machines that will be using this database takes 4 or 5 seconds to open even though cycling through records is almost intantaneous).
Oct 5 '06 #4
PEB
1,418 Expert 1GB
In fact to prevent values that aren't correct your way to do it is good...

Maybe your problem are the missed records? And you want to vizualize them and make the users to pay attention about...?

If you import data from Excel, linking your tables this can be possible... To obtain the records that haven't been imported...

You can use the find Unmatched query wizard for this task!

:)
Oct 8 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Xiphias | last post by:
Hi, Im trying to change the color of a text box on a report that im printing from a form. On the form I got a check box that has to tricker the color of that textbox on the printed report....
8
by: lauren quantrell | last post by:
When I open an Access form I can have no recordset specified, then in the form's OnOpen event I can do something like: Me.paramaters = "@SomeColumn = 22)" Me.recordsource = "dbo.sproc123" But I...
3
by: Alan | last post by:
I'm having brain fade today... Can the recordsource in a Form's properties do more than one select statement based on criteria? On a popup subform I'm trying to display matching records from a...
7
by: Alan | last post by:
With earlier help from this group (thanks Ben!) I've ended up with this OnLoad code for my popup form: Private Sub Form_Load() If IsNull(!!) = True Then Me.RecordSource = "SELECT .* FROM WHERE...
8
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Form is: Forms!FormName..RowSource = "TableOrQueryName"
11
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Master Report is: Me.RowSource = "TableOrQueryName"
2
by: David Haskins | last post by:
I have a fairly complex interface screen (form) that is comprised of several subforms that perform different, but related activities. I am designing a search/filter form that should be able to...
3
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RecordSource of a Master Report is: Me.RecordSource = "TableOrQueryName"
5
by: agarwasa2008 | last post by:
Hi, I have a linked table called tbltest and some bounded forms (which add, update, delete records) that were created using that linked table. For some necessary reasons I had to create another...
3
by: Simon van Beek | last post by:
Dear reader, How to change the RecordSource for a subReport. For forms the syntaxes is:
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.