dbTalk Databases Forums  

Linking combo boxes to tables that are being updated

comp.databases.ms-access comp.databases.ms-access


Discuss Linking combo boxes to tables that are being updated in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bezz
 
Posts: n/a

Default Linking combo boxes to tables that are being updated - 05-30-2011 , 10:30 AM






I have written a form that filters criteria via two combo boxes and generates a table of dates, relating to the start week and end
week of the activities, in the form 920 (week 20 of 2009)and 1112 (week 12 of 2011)

I want to give the user the option to narrow the dates down, such that they can select any date in between the first and last, for
a start date and end date, to preview/print the report.

The ideal way would seem to be use two combo boces weekstartcombo and week end combo, based on the table that is generated each
time the initial criteria, contract and section change.

Therein lies the proble, as because the select week combo boxes are bound to the table that will be updated using a make table
query, the fact that it is a rowsource of the combo stops the table being deleted and updated.

Anybody any alternate suggestions? I am just going to try using an append query insteadof a make table to see if that solves the
problem that way, but there might be a better way out there..

Thanks

J


--
--------------------------------- --- -- -
Posted with NewsLeecher v4.0 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Reply With Quote
  #2  
Old   
Phil
 
Posts: n/a

Default Re: Linking combo boxes to tables that are being updated - 05-30-2011 , 12:43 PM






On 30/05/2011 16:30:08, bezz wrote:
Quote:
I have written a form that filters criteria via two combo boxes and
generates a table of dates, relating to the start week and end week of the
activities, in the form 920 (week 20 of 2009)and 1112 (week 12 of 2011)

I want to give the user the option to narrow the dates down, such that
they can select any date in between the first and last, for a start date
and end date, to preview/print the report.

The ideal way would seem to be use two combo boces weekstartcombo and week
end combo, based on the table that is generated each time the initial
criteria, contract and section change.

Therein lies the proble, as because the select week combo boxes are bound
to the table that will be updated using a make table query, the fact that
it is a rowsource of the combo stops the table being deleted and updated.

Anybody any alternate suggestions? I am just going to try using an append
query insteadof a make table to see if that solves the problem that way,
but there might be a better way out there..

Thanks

J


Might be easier to just use s from and to date and use the DatePart function
to show the dates as weel nos

Phil

Reply With Quote
  #3  
Old   
bezz
 
Posts: n/a

Default Re: Linking combo boxes to tables that are being updated - 05-30-2011 , 04:24 PM



Tend to work in units of a week, and I've got a routine that converts dates to financial weeks . The delete and append actually
worked OK, hit a couple more problems but more due to bugs in Access than coding!
Working fine for the minute, thanks for reply..

J


--
--------------------------------- --- -- -
Posted with NewsLeecher v4.0 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Reply With Quote
  #4  
Old   
Vacuum Sealed
 
Posts: n/a

Default Re: Linking combo boxes to tables that are being updated - 05-31-2011 , 06:48 AM



Hi

Have you considered splitting the week & year into seperate control fields.

Whether this be normalised / logical in the proper DB structural sense is up
for criticism, but it has served me well in the past....

1. Create a table = tblFinYear (1 field = text: 9Char)

As most business activities ( in Australia ) is structured Jul to Jun, I use
the following format 2011/2012, 2012/2013,2013/2014...etc, I generally cover
around 50 years, but you're welcomed to go further....

2. Include a new field in your tblData-Entry in Question "txtFinYear",
setting it to the above format.

On the frmData-entry form attached to tblData-Entry , create a cboBox where
users have to select the Financial Year before moving onto the next specific
field in said form's data entry process.

from here-on, you only need to convert the date into a WeekNo..

This way when you create a search form, users can filter specific
years/weeks/days/dates from one parent form with one subform enclosed.

So, on the parent form, you would have your 1st combo's recordset point to
tblFinYear, your 2nd would be an Envoked Query based on the result of
cboBox1, you could then filter it further depending on how specific you want
to make it for users.

Your Master/Child Link would be the newly create "txtFinYear"

HTH
Mick

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.