Sabtu, 23 Desember 2017

RE: [MS_AccessPros] Re: Write all items in a list box to a table

 

Hi Art

Your loop control variable is i, while the index variable you are using is itm.  You should be using .ItemData(i)

This also suggests that you do not have Option Explicit in this module, which is the best way to introduce this kind of bug!

Best wishes,
Graham

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Sunday, 24 December 2017 12:59
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Write all items in a list box to a table

 

 

 

OK Getting closer


For i = 0 To Me.lsteSubFolder.ListCount - 1

rstSubFolder.AddNew
rstSubFolder!SubLevelOneKey = Me.txtSubLevelOneKey
rstSubFolder!SubFolderName = Me.lsteSubFolder.ItemData(itm)
rstSubFolder!CAbinetID = Me.txtCabinetID
rstSubFolder!SL1NextLevel = "No"
rstSubFolder.Update

Next i


This almost works but not quite. If i put 3 items in the list box then its repeating the the first item in the listbox 3 times in the table, so instead of giving me APPLICANT, DATE, COMPANY it is writing APPLICANT,APPLICANT,APPLICANT in the table/

 

__._,_.___

Posted by: "Graham Mandeno" <graham@mandeno.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Re: Write all items in a list box to a table

 


OK Getting closer


For i = 0 To Me.lsteSubFolder.ListCount - 1

rstSubFolder.AddNew
rstSubFolder!SubLevelOneKey = Me.txtSubLevelOneKey
rstSubFolder!SubFolderName = Me.lsteSubFolder.ItemData(itm)
rstSubFolder!CAbinetID = Me.txtCabinetID
rstSubFolder!SL1NextLevel = "No"
rstSubFolder.Update

Next i


This almost works but not quite. If i put 3 items in the list box then its repeating the the first item in the listbox 3 times in the table, so instead of giving me APPLICANT, DATE, COMPANY it is writing APPLICANT,APPLICANT,APPLICANT in the table/
 

__._,_.___

Posted by: dbalorenzini@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Re: Write all items in a list box to a table

 

I have worked it out so far to the following code.


 

  With Me

 

    For Each varX In Me.lsteSubFolder.ItemsSelected

 

        rstSubFolder.AddNew

        rstSubFolder!SubLevelOneKey = Me.txtSubLevelOneKey

        rstSubFolder!SubFolderName = .lsteSubFolder.ItemData(varX)

        rstSubFolder!CAbinetID = Me.txtCabinetID

        rstSubFolder!SL1NextLevel = "No"

        rstSubFolder.Update

    Next varX

End With

 
THis is really close but the only problem is I have to select items and then click my cmdDone button. I just want to click the cmdDone and have it write all items in the list box automatically.

__._,_.___

Posted by: dbalorenzini@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Write all items in a list box to a table

 

I am trying to write all the items in a listbox to a table. This is the code I have come with so far:



For each itm in me.lsteSubFolder.ItemSelected
rstSubFolder.AddNew
rstSubFolder!SubLevelOneKey = me.txtSubLevelOneKey
rstSubFolder!SubFolderName = Me.txtSubFolder01Label
rstSubFolder!CAbinetID = me.TxtCabinetID
rstSubFolder!SL1NextLevel = "No"
rstSubFolder.Update

Loop

I know this is not quite right because I am using ItemSelected but I want to write all items in the listbox to the table.

Thank you, 
Art Lorenzini
SD


__._,_.___

Posted by: dbalorenzini@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Kamis, 21 Desember 2017

Re: [MS_AccessPros] Normalization of a table

 

Thank You Duane. Yes, I created the database for my personal use because my boss always wanted to know what I was doing for the week and I needed a way to track what things I did to the databases for future documentation. I think that I am going to delete the monthlygoal field. I remember what I used it for and I do not think I need it anymore. This database has also been my testing ground for new tweeks and learning new things. I have incorporated the things I learn and put them into the production databases we maintain.
thank you again

Jim Wagner


On ‎Thursday‎, ‎December‎ ‎21‎, ‎2017‎ ‎12‎:‎46‎:‎08‎ ‎PM, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Hi Jim,


I wouldn't think you need to pull any fields out but some considerations:

- you have several date fields. These could be in a separate, related table of milestones but in your case I think simpler is better

- If a task might be for more than one department you could create a junction table of TaskID/DeptID

- The same is true if a task be of more than one type

- You might be able to get rid of the MonthlyGoal and only use the YearGoal.. If YearGoal isn't null I would assume MonthlyGoal would be Yes/true

Overall, I think it looks good. Since there isn't an employeeID field I assume this is for your use.

Regards,
Duane


From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, December 21, 2017 12:25 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Normalization of a table
 


Hello All,


I am normalizing a table so that I can move it to SQL. I wanted the table to normalized before I import it into the SSMS. But I have a question about some fields that I am not sure I should move out of the main table..


The table is tblTasks. it is the main table that holds the information of the tasks and projects. the fields are below. Could I get some instructions on which ones I should move off?


Thank You

Jim Wagner


TaskID    AutoNumber

TaskDate    Date/Time

Rank    Either A, B, or C

TaskType    Number data type with the field being linked to tblTaskType table

TaskTitle    the title of the Task. high level description

TaskDescription Long Text data type. long description

TaskName    short/text linked to tblTaskNames table that usually is the name of the database working on

Accomplishments Yes/No data type. it is to help me run a report of my yearly accomplishments for the year

ForResume    To run a report to add projects to my resume

MonthlyGoal    Yes/NO data type If it a Yearly goal, it would be the Year of the goal

StatusType    Short Text data type. it is the status of the task like in process or completed or on hold

Department    the department the work is being done for.

DueDate    The date the task is due

CompletedDate    the date the task was completed

ColorOfRecord    a way of relating a color to the task. Used in another form to colorize a task.

YearGoal    the year the goal is referred to. Not all task is a goal record. Related to MonthlyGoal field



__._,_.___

Posted by: Jim Wagner <luvmymelody@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Re: [MS_AccessPros] Normalization of a table

 

Hi Jim,


I wouldn't think you need to pull any fields out but some considerations:

- you have several date fields. These could be in a separate, related table of milestones but in your case I think simpler is better

- If a task might be for more than one department you could create a junction table of TaskID/DeptID

- The same is true if a task be of more than one type

- You might be able to get rid of the MonthlyGoal and only use the YearGoal. If YearGoal isn't null I would assume MonthlyGoal would be Yes/true

Overall, I think it looks good. Since there isn't an employeeID field I assume this is for your use.

Regards,
Duane


From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, December 21, 2017 12:25 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Normalization of a table
 


Hello All,


I am normalizing a table so that I can move it to SQL. I wanted the table to normalized before I import it into the SSMS. But I have a question about some fields that I am not sure I should move out of the main table.


The table is tblTasks. it is the main table that holds the information of the tasks and projects. the fields are below. Could I get some instructions on which ones I should move off?


Thank You

Jim Wagner


TaskID    AutoNumber

TaskDate    Date/Time

Rank    Either A, B, or C

TaskType    Number data type with the field being linked to tblTaskType table

TaskTitle    the title of the Task. high level description

TaskDescription Long Text data type. long description

TaskName    short/text linked to tblTaskNames table that usually is the name of the database working on

Accomplishments Yes/No data type. it is to help me run a report of my yearly accomplishments for the year

ForResume    To run a report to add projects to my resume

MonthlyGoal    Yes/NO data type If it a Yearly goal, it would be the Year of the goal

StatusType    Short Text data type. it is the status of the task like in process or completed or on hold

Department    the department the work is being done for.

DueDate    The date the task is due

CompletedDate    the date the task was completed

ColorOfRecord    a way of relating a color to the task. Used in another form to colorize a task.

YearGoal    the year the goal is referred to. Not all task is a goal record. Related to MonthlyGoal field



__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Normalization of a table

 

Hello All,


I am normalizing a table so that I can move it to SQL. I wanted the table to normalized before I import it into the SSMS. But I have a question about some fields that I am not sure I should move out of the main table.


The table is tblTasks. it is the main table that holds the information of the tasks and projects. the fields are below. Could I get some instructions on which ones I should move off?


Thank You

Jim Wagner


TaskID    AutoNumber

TaskDate    Date/Time

Rank    Either A, B, or C

TaskType    Number data type with the field being linked to tblTaskType table

TaskTitle    the title of the Task. high level description

TaskDescription Long Text data type. long description

TaskName    short/text linked to tblTaskNames table that usually is the name of the database working on

Accomplishments Yes/No data type. it is to help me run a report of my yearly accomplishments for the year

ForResume    To run a report to add projects to my resume

MonthlyGoal    Yes/NO data type If it a Yearly goal, it would be the Year of the goal

StatusType    Short Text data type. it is the status of the task like in process or completed or on hold

Department    the department the work is being done for.

DueDate    The date the task is due

CompletedDate    the date the task was completed

ColorOfRecord    a way of relating a color to the task. Used in another form to colorize a task.

YearGoal    the year the goal is referred to. Not all task is a goal record. Related to MonthlyGoal field

__._,_.___

Posted by: luvmymelody@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___